Structured output
Tools that declare an outputSchema also return structuredContent. The text block stays for clients that only read text. Do not parse the text when structured fields exist.
context_pack is experimental and must not declare an outputSchema.
These tools declare a schema:
| Tool | Payload |
|---|---|
read_file | content, content_hash, status, truncated. Range fields and continuation when cut. Batch: hash on each files[] entry, not at the top. |
write_file | path, bytes_written, content_hash, verified, status, message. Optional backup_id, feedback. |
edit_file | path, replacements, lines_added, lines_removed, total_lines, content_hash. Optional backup_id, parent_backup_id, warnings. |
multi_edit | Same family as edit, with successful_edits and total_edits. |
search_files | Hits, truncated, hidden_count, continuation. Empty is status:empty and is not an error. |
list_directory | Entries. Tree output includes truncated and hidden_count. |
batch_operations | status, kind, success, counts, items, retryable, message. Optional backup_id, rollback_status. |
backup | status, action, message. |
list_allowed_directories | Roots plus version, commit, build date, profile, roots mode, readonly, tool count. |
diff_files | Diff payload. |
apply_patch | Apply result. |
analyze_code | status, action, findings, truncated, tool, retryable, message. |
security_policy | Whether a policy is active. No patterns. |
github_issues | Issue payload. |
gitlab_issues | Issue payload. |
status on mutations is applied, simulated, empty, partial, or failed, depending on the tool. simulated is a dry-run. write_file has no dry-run. Its status is applied.
content_hash is FNV-1a, 8 hex digits, of the full file bytes from the same snapshot as the body (or, for writes, of the reopened host file).
detail (summary, normal, full) shapes structured content on directory_tree, search_files, batch read_file, and help without a tool name. Compact mode trims text. It does not replace detail.