Skip to content

Validate MCP tool arguments against the input schema

Schema validation before the call goes out. mcp-tui checks arguments against the tool's full input schema and names the argument and rule that broke it, then lets you send the bad call anyway to see how the server rejects it.

search_tickets accepts limit from 1 to 50:

Terminal window
mcp-tui --url http://127.0.0.1:8931/mcp tool call search_tickets limit=500
❌ Arguments do not match the tool's input schema
Error: tool "search_tickets": argument "limit": 500 is greater than the maximum 50 (input schema at /properties/limit) (--skip-arg-validation sends them anyway)

The check covers the whole schema: types, minimum/maximum, lengths, pattern, enum, const, required, nested objects and arrays, and rules no single field shows (if/then/else, not, patternProperties). Same-document $refs are followed. The error names the argument (filter.customer_id, tags[0]) and the schema path.

key=value arguments are converted to the declared type first, so limit=3 sends the number 3 and id=0123 for a string field keeps the leading zero. key:=<json> sends a JSON literal as is.

Terminal window
mcp-tui --url http://127.0.0.1:8931/mcp tool call search_tickets limit=500 --skip-arg-validation
⚠ Sending anyway (--skip-arg-validation): argument "limit": 500 is greater than the maximum 50 (input schema at /properties/limit)
⚠ Tool returned an error result (isError:true)
Error response from tool:
validating "arguments": validating root: validating /properties/limit: maximum: 500/1 is greater than 50.000000

The demo server is built on the Go SDK, which validates arguments itself and answers with a tool error. A server that accepts the call instead has a validation gap worth reporting.

The form refuses the same call and shows the violation under the title. Ctrl+O switches to sending such calls anyway ([schema violations sent] in the title), and the CLI command it copies then carries --skip-arg-validation.