Specify the fields the consumer needs
Document tool names, input schemas, return fields, and error categories. Distinguish successful results from no matches, denied access, and temporary failure rather than returning ambiguous prose for all cases. Expose only task-relevant data; secrets and complete request headers do not belong in diagnostic response fields.
Define types, allowed ranges, and size limits. External pages, files, and search snippets are untrusted data. Text inside them asking the agent to ignore earlier instructions must not change task permissions. Place such content in clearly identified data fields while the application continues to enforce tool policy.
Validate and bound results before continuation
Validate a tool response before retaining fields needed for the next step. Mark truncation or provide pagination when content is too large. Silently removing an important ending and presenting the result as complete can mislead both the model and the user. Missing or unparseable fields should enter a defined failure path rather than invite invented replacements.
Separate machine-readable status from user-facing prose so consumers do not detect success by matching a sentence. Results may contain user input or internal source information; public rendering needs its own sanitization path. Retain enough redacted diagnostics to investigate without copying every raw result into ordinary logs.
Challenge consumers with abnormal fixtures
Test empty results, incorrect types, unknown fields, oversized text, duplicate events, and embedded instructions. Check rejection, understandable failure reasons, and whether an invalid result causes unnecessary additional calls. Use synthetic fixtures without real credentials or protected content.
Version the contract when a tool changes, pilot the change within a controlled scope, and retain a route to the previous implementation. New fields must not automatically grant new execution permissions, and new actions require authorization review. Model, client, and tool are separate boundaries; success at one boundary does not establish end-to-end compatibility.
Sources & further reading
An owned publication maintained by NexoToken. Product references reflect the publisher’s commercial interest and are not independent certification.