Question 1
Your Claude agent has access to a tool that retrieves customer records. A teammate has noticed that the agent occasionally calls the tool with arguments the schema does not declare, and the tool's downstream service returns an error each time. The teammate proposes loosening the schema so the tool accepts whatever arguments the model produces.
How would you respond?
- AOption A:
Add a system prompt instruction telling the model to produce schema-conforming arguments, treating the prompt instruction as the primary mechanism for keeping the agent's tool calls valid.
- BOption B:
Keep the schema strict, validate arguments before dispatching, and return a structured error so the agent can retry.
- COption C:
Remove the schema entirely and rely on the downstream service to reject invalid calls, treating the downstream service as the team's primary enforcement layer.
- DOption D:
Loosen the schema as the teammate proposed so the downstream service receives every call the agent makes during normal operation.
Show answer and explanation
Correct answer: B
The supplied question identifies B as the intended answer. Tool schemas are contracts between Claude and executable application code. When the downstream service accepts only a defined set of arguments, relaxing that schema merely shifts invalid data farther into the system and increases runtime failures.
Anthropic's current tooling provides an even stronger implementation of this principle through strict tool use . Setting strict: true constrains tool inputs to the declared JSON Schema, preventing undeclared properties, missing required values, and incompatible parameter types where the supported schema subset is used. Anthropic explicitly recommends strict tool use for validated parameters, type-safe function calls, and reliable agentic workflows.
In a non-strict or legacy implementation, the application should still validate arguments before dispatch and convert invalid calls into structured tool errors that Claude can interpret and potentially correct. A prompt instruction can reinforce behavior, but it should not replace deterministic validation. C and D weaken the system boundary and knowingly send invalid calls downstream.
Therefore, maintain the contract rather than adapting the contract to malformed model output.
Relevant Claude Developer topics: Agent Construction, tool schemas, strict tool use, JSON Schema, parameter validation, structured errors, retry behavior, and defensive execution boundaries .
===============