Skip to content

Move schema validation to tool-call command only#155

Open
jancurn wants to merge 6 commits intomainfrom
claude/remove-schema-validation-6R5cD
Open

Move schema validation to tool-call command only#155
jancurn wants to merge 6 commits intomainfrom
claude/remove-schema-validation-6R5cD

Conversation

@jancurn
Copy link
Copy Markdown
Member

@jancurn jancurn commented Apr 9, 2026

Summary

This PR removes schema validation from the global CLI options and the tools-get and prompts-get commands, moving it exclusively to the tools-call command where it's most useful for validating arguments before execution.

Key Changes

  • Removed global --schema and --schema-mode options from the top-level CLI program and session program, making them command-specific instead
  • Added --schema and --schema-mode options to tools-call command with dedicated help text explaining their purpose
  • Removed schema validation logic from getTool() and getPrompt() commands - these commands no longer validate schemas
  • Removed schema-related imports and validation code from tools.ts and prompts.ts command files
  • Updated parser.ts to move --schema and --schema-mode from global options to subcommand-specific options, removing validation for schema file existence and mode values at parse time
  • Removed schema validation tests from e2e test suite for tools-get and prompts-get commands
  • Updated documentation in README.md to reflect that schema validation is now specific to tools-call

Implementation Details

  • Schema validation is now only performed when calling tools with tools-call --schema, not when listing or getting tool/prompt definitions
  • The --schema and --schema-mode options are now parsed as subcommand-specific options rather than global options
  • Removed early validation of schema file existence and --schema-mode values from the parser, allowing these to be validated at command execution time if needed
  • Updated help text and examples to clarify that --schema is for validating tool schemas before calling them

https://claude.ai/code/session_012EqvtRBWtSQHn25i68cRiN

claude and others added 6 commits April 9, 2026 12:34
Schema validation via --schema/--schema-mode was a global option used by
tools-call, tools-get, and prompts-get. This was confusing — narrow the
scope to tools-call only, where it's most useful for CI/script validation.

https://claude.ai/code/session_012EqvtRBWtSQHn25i68cRiN
tools-get is a natural place to validate a tool schema hasn't changed
without side effects, so keep --schema/--schema-mode there too.

https://claude.ai/code/session_012EqvtRBWtSQHn25i68cRiN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants