Appearance
Input and Output Contracts
Input and output contracts are validation and interpretation hints. They do not replace the native protocol schema.
Input contract
tool_input_contract SHOULD include:
- JSON Schema-compatible
model_input_schema. - Optional
runtime_input_schemafor internal fields. strictwhen the provider/runtime can enforce schemas.defaultswhere safe.examplesfor model grounding.sensitive_fieldsfor redaction and telemetry controls.internal_only_fieldsthat must not be model-generated.argument_mode:json,text,file,multipart,stream, orcustom.mutation_policy: whether hooks or permission prompts may replace input.
Input variants
Keep these separate: model_input, observable_input, permission_input, and call_input. This prevents path normalization, permission UI edits, or internal fields from corrupting the original model-provided arguments.
Output contract
tool_output_contract SHOULD include:
structured_schemafor structured content.content_typesfor text, image, audio, video, file, log, or resource refs.artifact_expectationswhen the tool should produce a durable deliverable.max_inline_bytesormax_inline_charsto prevent giant payloads entering prompts.persistence_policy_reffor preview, persist, redaction, and never-persist rules.rendering_boundaryto separate model content, UI rendering, and transcript search text.redaction_rulesandfallback_summaryguidance.
If a native protocol already has schemas, Agent Tool should reference them and add agent-specific interpretation rather than copying everything.