A useful tool schema tells Claude Code what a call means, which facts it needs, and what evidence will come back. Name the tool after the task, name each input after its meaning, mark required inputs explicitly, and describe both appropriate and inappropriate uses. Valid JSON alone does not resolve intent. Strict schema conformance can help only on surfaces that support it, and even a clear definition cannot guarantee the right selection. Before integration, review one representative call and compare its arguments with the decision you wanted the tool to support.
Why ambiguous tool definitions cost time
A weak definition creates two separate problems. First, the caller may not know what to provide. Second, the tool user may not know whether the tool answers the current question. Those problems can appear even when every request passes validation.
Consider a lookup tool with inputs named query and type. The schema accepts strings, yet neither field says whether query means a repository path, a customer identifier, or free text. type could describe the object being fetched or the operation being requested. A caller can satisfy the declared types while still making the wrong call. The resulting output may be valid for the wrong target, which makes the next decision harder rather than easier.
That is why schema review belongs with requirements work, not only server implementation. The observable-outcomes guide for Claude Code treats visible behavior as the contract. A tool contract should likewise expose observable inputs and outputs. The acceptance-examples approach can supply a representative request without prescribing every implementation detail.
The cost is practical. A reviewer must reconstruct the intended meaning from code, test several guesses, or ask the author. An operator may receive a success response that answers a different question. None of those outcomes proves a universal defect in Claude Code. They are failure modes of an underspecified interface, and they are preventable design work.
What the evidence supports
Official, F073: The tool-use overview says client tools require an input_schema. The requirement belongs to the documented API tool contract. It does not mean every interactive Claude Code tool is user-defined, and it does not establish a universal schema feature set for every integration.
Official, F074: The same overview documents strict: true as a way to request strict schema conformance. Availability depends on the model and integration surface. Treat this as an optional capability to verify on the surface you own, not as a switch that every MCP or interactive workflow exposes.
Official, F075: The tool-search documentation shows that tool definitions are the material discovered when a deferred tool is loaded. A clear definition therefore matters at selection time. The caveat is equally important: better descriptions do not guarantee the correct call.
The Define tools page is included as an official companion reference. The supplied research register records it as a canonical link rather than a fully fetched page, so this article does not infer additional mechanics from it. The independent software requirements guide is search-index evidence only. It supports the general practice of recording constraints and assumptions, not Claude Code behavior.
No verified benchmark in the packet measures how much a naming change improves tool selection. The guidance below is an editorial review method grounded in the documented contract, not a performance claim.
How a schema communicates intent
A schema has several jobs beyond type checking. The tool name frames the task. The description identifies the evidence the tool can return. Property names identify concepts. Required fields identify information that cannot be inferred safely. Restrictions and descriptions narrow the intended use without pretending to enforce product policy.
Think of the definition as a small interface brief. A reader should be able to answer four questions before executing anything:
- What user or system task does this tool serve?
- Which concrete inputs identify the subject and requested evidence?
- What result should the caller inspect?
- When should the caller choose another method or ask for a decision?
These questions align with the prompt-specificity principle: point to meaningful evidence instead of adding vague emphasis. They also connect to tool-result evidence contracts, because a good input definition and a useful returned result solve different halves of the same problem.
A schema should not hide a product decision inside a property. If an input can mean several incompatible things, split it, constrain it with verified values, or state the missing decision. Adding a longer description to an ambiguous field does not remove the ambiguity.
Choose a task-oriented tool name
Prefer a name that describes the action and subject. get_invoice_by_id communicates more than query_data because a reader can predict the target and likely result. The same principle applies whether the definition is exposed through a custom API integration or an MCP tool used by Claude Code.
Avoid names that imply a guarantee the implementation cannot provide. A tool called verify_invoice suggests a stronger judgment than a tool that retrieves an invoice record. If the operation only reads stored data, name the read. If it performs a calculation, name the calculation. Doing so keeps the selection decision tied to actual capability.
| Tool name | Purpose | Return evidence to describe |
|---|---|---|
get_invoice_by_id |
Retrieve one invoice selected by its identifier | The matching invoice record, or an explicit not-found result |
list_open_invoices |
List invoices in a named open state | The returned records and the filter that was applied |
calculate_invoice_total |
Calculate a total from supplied line items | The calculated total and the inputs used |
search_invoice_notes |
Search note text within a stated scope | Matching notes and the searched scope |
The names above are illustrative design examples, not claims about built-in Claude Code tools. Their value comes from making the action and subject visible before a call is constructed.
A task-oriented name also reduces overlap with neighboring tools. If two definitions appear to do the same thing, compare their inputs and returned evidence. Remove the overlap, narrow each purpose, or document the decision that separates them. The deferred tool-discovery pattern makes definition quality especially relevant when a tool is loaded on demand, although that API pattern is not an automatic Claude Code feature.
Describe what the tool returns
The result description should tell the caller what question the output can answer. State the record shape, the scope of the search, and any explicit absence condition that the implementation supports. Do not claim error behavior that has not been implemented and inspected.
For example, a retrieval description might say that a matching record is returned when the identifier exists, while an unmatched identifier produces a not-found result. Such a result is more useful than saying the tool returns data. A calculation description might identify the inputs echoed in the result so the caller can compare them with the original request.
Separate a successful execution from a successful answer. A process can run without an exception and still return no matching evidence. The definition should make that possibility visible where it matters. That distinction supports the evidence-first approach in investigate before answering without importing API-only tool_choice controls into interactive Claude Code.
Return descriptions also help a human reviewer. When an output looks surprising, the reviewer can compare the returned scope with the intended scope. Comparing them is faster than reverse engineering the tool from its implementation.
Describe when not to use the tool
A negative-use sentence prevents nearby tools from competing for every request. A single-record lookup should not be described as the right choice for bulk analysis. A note search should not imply that it searches the entire invoice database unless that is its actual scope.
Use direct boundaries:
- Do not use the single-record lookup to infer aggregate totals.
- Do not use the note search when the identifier is already known and a direct lookup exists.
- Do not use the calculation tool to change stored invoice state.
- Ask for a decision when the requested filter has no agreed meaning.
These statements are interface guidance, not automatic enforcement. The negative-requirements pattern applies here: exclusions should be concrete enough to review. A vague warning such as use responsibly gives the caller nothing to check.
When the tool cannot decide between product meanings, the description should say so. For example, an include_cancelled field may represent a product policy that the tool author does not own. Better to expose the decision in the task brief or obtain an agreed default than to bury it in a field name.
Name inputs by meaning
Replace generic names with the concept they carry. invoice_id is clearer than id when the tool operates on invoices. search_text is clearer than query when the field searches note text. status_filter is clearer than type when it selects invoice records by state.
Meaningful names reduce the amount of surrounding prose needed to explain a call. They also make review easier because the argument list resembles the decision being requested. This is particularly useful when several tools share a broad domain.
| Input field | Meaning | Required status in the illustrative design |
|---|---|---|
invoice_id |
Identifier of the invoice to retrieve | Required for single-record retrieval |
search_text |
Text to match within invoice notes | Required for note search |
status_filter |
Invoice state used to limit a list | Optional when an unfiltered list is valid |
include_cancelled |
Whether cancelled invoices belong in the result | Optional only when the default is documented |
result_limit |
Maximum number of records requested | Optional only when the tool has a defined default |
The required status is a design decision, not a universal rule. A field is required when the operation cannot identify its subject or interpret its scope without it. An optional field should have a meaningful default or an explicitly documented absence behavior.
Avoid making every field required to appear precise. Making that choice pushes callers to invent values and weakens the distinction between essential and convenient inputs. The opposite mistake is just as costly: an essential identifier hidden among optional controls makes malformed intent easier to express.
Mark required versus optional inputs
Required inputs should correspond to information the caller already knows or can obtain safely. If a required value depends on an unresolved product choice, the schema is not ready. Resolve the choice before integration or make the ambiguity a visible decision point.
Optional inputs need a stated meaning when omitted. A filter can mean no filter, a default state, or an error. Those are different contracts. Pick the one the implementation supports and describe it beside the field.
This is where structured briefs and supported output surfaces offer a useful boundary lesson. A format requirement in prose does not prove that a feature exists on an interactive surface. Likewise, a schema property does not prove that the integration supports every constraint you want to express.
For a representative call, ask whether the required arguments can be traced to the user request or inspected repository evidence. If an argument was guessed, record the guess. If the guess changes the result materially, stop and clarify instead of allowing the tool call to conceal the uncertainty.
Use strict schemas where supported
Strict conformance can reduce avoidable structural variation on a compatible surface. It does not decide which tool is appropriate, whether a field value is factually correct, or whether the result answers the user’s question.
Before enabling or relying on strict mode, verify the model and integration surface. The documented strict: true request in F074 is not permission to assume universal MCP or Claude Code support. Keep the semantic review separate from the compatibility check.
A practical sequence is:
- Write meaningful names, descriptions, and required fields.
- Inspect a representative call against the intended task.
- Verify whether the target surface supports strict schema conformance.
- Enable it only where supported, then repeat the representative-call review.
- Keep checking semantic fit, because structural validity is not evidence quality.
Such a sequence avoids treating a technical capability as a substitute for interface design. It also creates a clean review record: one question concerns compatibility, another concerns meaning.
Review ambiguous field names
Read the definition as if you had no access to its implementation. For each field, write the decision it controls. If you need several incompatible sentences, the field is doing too much. If you cannot write any sentence, the field may be decorative or premature.
| Ambiguous description | Clearer description | Why the revision helps |
|---|---|---|
| “The query to run” | “Text to match within invoice notes in the selected workspace” | Names the searched content and scope |
| “The type” | “Invoice state used to filter the returned records” | Replaces a generic category with the actual decision |
| “Optional options” | “Include cancelled invoices; omit to exclude them” | Gives omission an observable meaning |
| “Returns the result” | “Returns the matching invoice record or an explicit not-found result” | States what evidence closes the call |
| “Use for invoice work” | “Use to retrieve one invoice by its known identifier” | Narrows selection to a task and target |
The wording in this table is illustrative. It does not promise a particular implementation. Its purpose is to expose the difference between a field that merely accepts data and a field that communicates a decision.
The official prompting guidance supports clear instructions and specific formats. Applied to schema writing, that means describing the contract in plain language rather than relying on emphasis or long lists of adjectives.
Check a representative call before integration
Use a small, concrete review case. The following request is illustrative and read-only. It asks for one invoice by a known identifier. No live service, model ID, or installed server is assumed.
{
"invoice_id": "INV-1042",
"include_cancelled": true
}
Ask four review questions:
- Does
invoice_ididentify the intended subject without interpretation? - Is
include_cancelledmeaningful for a direct lookup, or is it unnecessary? - Does the tool description say what happens when no record matches?
- Could a neighboring list or search tool answer the request with less ambiguity?
In this example, a reviewer might remove include_cancelled if direct retrieval does not filter by state. That change is not a claimed fix for a reported defect. It is a design observation from the illustrative contract. The important habit is to compare the call with the task instead of approving it because the JSON parses.
Next, inspect the result contract. If the request asks for evidence, the result should contain the evidence or an explicit absence result. An opaque success status does not close the loop. The tool-results article explains how to make returned evidence serve the question that caused the call.
Record the review beside the definition. A short note can list the task, selected tool, supplied arguments, expected evidence, and unresolved assumption. That makes the design inspectable without turning every review into a new configuration system.
A practical schema review runbook
Use this checklist when a custom or MCP definition produces confusion. It focuses on meaning and selection, not server installation or permission configuration.
| Review stage | Question | Action when the answer is weak |
|---|---|---|
| Purpose | Does the name state an action and subject? | Rename around the actual task |
| Inputs | Can each field be explained as a decision? | Split, rename, or remove the field |
| Required status | Would omission make the task impossible to interpret? | Mark essential inputs required |
| Defaults | Is the meaning of omission explicit? | Document the supported default |
| Result | Does the description name usable evidence? | State record shape, scope, and absence behavior |
| Selection | Are nearby tools clearly different? | Narrow purpose or resolve overlap |
| Compatibility | Does this surface support the desired constraints? | Verify support rather than assume it |
| Representative call | Do arguments match the intended task? | Revise the definition or clarify the request |
Run the review with one ordinary case and one boundary case. The ordinary case checks whether the interface reads naturally. The boundary case checks whether optional fields and absence results retain their meaning. It is not a benchmark and does not establish complete coverage. It is a small design check with a clear purpose.
Connect the review to task checkpoints when the work spans several tools. A checkpoint can record which definition changed, which representative call was inspected, and what remains unresolved. The checkpoint is a progress aid, not proof that the schema is correct.
Concrete win, loss, and implication
Win: A team replaces a generic query field with search_text and adds a scope description. During a representative review, the caller can now distinguish a note search from an invoice lookup before any integration work. The win is a clearer review decision, not a measured reduction in failed calls.
Loss: A perfectly valid schema can still send the caller to the wrong tool when two definitions overlap. Strict conformance does not repair that overlap, and a longer description may only hide it. The loss is semantic: the interface accepts the request without establishing that the selected operation is appropriate.
Implication: Treat schema review as part of task design. Assign an owner to the meaning of each field, inspect a representative call, and record unresolved product choices before integration. If the selected tool cannot return the evidence the task needs, change the tool or the request instead of trusting the status message.
This boundary matters for edit work too. Once a definition changes, use an exact edit target so a naming revision does not spread into unrelated properties. End the revision at the agreed scope boundary, and defer broader cleanup.
Data gap and future update
The packet contains no verified benchmark for tool-name quality, schema descriptions, or strict-mode selection accuracy. It also contains no verified community issue describing a universal Claude Code schema defect. Those gaps rule out claims about failure rates, token savings, or a guaranteed improvement.
Future updates should add reproducible evidence: the integration surface, model and tool definition, representative tasks, expected calls, observed calls, and review criteria. Compatibility claims should be rechecked because documentation is live. Until that evidence exists, use this article as a review method, not a performance ranking.
The independent requirements source remains snippet-only in the supplied register. A future editorial pass can replace it with an accessible primary requirements source if one is verified. That change would strengthen the supporting context, not alter the official facts F073 to F075.
One AI option for OpenAI-format agents
If you also maintain OpenAI-format agents, One AI provides an OpenAI-format route at https://api.oneaiapikey.com/v1 with one key and 46 live free IDs. Review the free model list or follow the OpenAI-format quickstart. Those free IDs are for OpenAI-format agents, not a Claude Code model source. The packet records the Claude IDs as unavailable on 2026-11-27, so this option does not replace or extend a Claude Code route.
FAQ
Does a valid JSON schema guarantee an unambiguous call?
No. Validation can establish structural conformance, but it cannot establish that the selected tool, field values, or returned evidence match the intended task. Review meaning separately from syntax.
Should every input be required?
No. Require information the operation needs to identify its subject and interpret its scope. Optional inputs need a documented default or an explicit absence behavior. Making everything required can force callers to invent values.
Can I use strict: true with every Claude Code integration?
Do not assume that. F074 documents strict conformance for a supported API surface and states that availability depends on the model and integration. Verify the surface you own before relying on it.
What belongs in a tool description?
State the task, the evidence returned, important scope limits, and when another method is more appropriate. Keep product decisions visible instead of hiding them inside generic field names.
Connect this schema review to the batch
For the requirements behind a tool contract, use observable requirements, goals, rules, and examples, negative requirements, and acceptance examples. Resolve unknown policy through clarification before choosing and name evidence through prompt specificity.
For execution surfaces, compare structured agent briefs, plan-mode approval, exploration plans, task exit conditions, and plan dependencies. Use plan revision when new evidence invalidates the agreed direction.
For tool behavior, continue with investigation before answering, independent parallel reads, evidence-bearing tool results, and deferred tool definitions. Each carries an explicit API-versus-Claude-Code boundary.
For surrounding execution quality, read inspectable task checkpoints, exact edit targets, style-preserving edits, behavior-preserving refactors, and agreed stop conditions.
More Claude Code troubleshooting
- Claude Code Reversible Planning: Sequence Small Changes First
- Claude Code CLAUDE.md: Keep Only Instructions Every Task Needs
- Claude Code Progressive Disclosure: Scope Rules to Relevant Files
- Claude Code Context Relevance: Read the Smallest Useful Evidence Set
- Claude Code Conflicting Instructions: Write a Clear Precedence Rule
- Claude Code Image Prompts: Pair Visual Evidence With Written Constraints
- Claude Code File References: Add Evidence Without Repository Noise
- Claude Code Context Audit: Inspect Loaded Files Before Adding More
Sources
- Tool use with Claude, official. Supports F073 and F074, with API-surface caveats.
- Define tools, official. Canonical companion link in the supplied register; no additional mechanics inferred.
- Tool search tool, official. Supports F075 and its selection caveat.
- Claude prompting best practices, official. Supports clear instructions and specific formats.
- Software requirements specification guide, independent. Search-index evidence only.