Skip to content

fix(store): report a tool inputSchema that is not an object schema - #216

Merged
kerlenton merged 3 commits into
kerlenton:mainfrom
DevMello:fix/non-object-input-schema-root
Aug 8, 2026
Merged

fix(store): report a tool inputSchema that is not an object schema#216
kerlenton merged 3 commits into
kerlenton:mainfrom
DevMello:fix/non-object-input-schema-root

Conversation

@DevMello

@DevMello DevMello commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Part 1 of #199.

A tool whose inputSchema has no root type is rejected by clients at
registration. analyzeSchema walked subschemas for constructs that travel
badly but never read the root type, so the one condition here that is a
violation was the one it could not report.

Adds a nonObjectRoot finding, set when inputSchema is absent, is not a JSON
object, or has a root type that is not "object". Nothing is resolved and no
dialect is interpreted. The TUI ranks it above every existing kind, since the
others say a schema may be read differently across clients and this one says a
conforming client refuses the tool.

Nine existing fixtures were rootless schemas used to test construct detection,
so they trip the new finding too. I gave each a valid object root rather than
adding the new kind to every want, so each test keeps isolating one thing.

Reporting this on the tools/list frame so that check fails is a follow-up,
kept separate to keep this reviewable.

Clients reject such a tool at registration, so a capture shows a clean
tools/list and then no tools/call. analyzeSchema walked subschemas but never
read the root type, so the one finding here that is a violation was the one it
could not report.

An absent inputSchema fails the same rule. The TUI ranks it first, since every
other finding is an observation rather than a violation.

Refs kerlenton#199
@github-actions github-actions Bot added the fix label Aug 8, 2026
@kerlenton

Copy link
Copy Markdown
Owner

LGTM! Thanks!

@kerlenton
kerlenton merged commit dde5890 into kerlenton:main Aug 8, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants