Skip to main content
MCP Documentation

Code Tool Schemas

Reference for code service request/response formats, approval payloads, and diff packaging.

Search & read

`CodeSearchRequest` accepts query strings, filters, and ranking hints. Results surface scoring metadata so orchestrator plans can choose the best snippet.

  • `highlight_ranges` show exact line matches for UI rendering.
  • `safety_class` documents whether a tool is read-only or gated.
  • `repository_state` ensures cache coherence when repos update mid-run.

Patch proposals

`PatchProposal` includes diff text, impacted files, and estimated test surface area. Approvals require `PatchApproval` objects listing reviewers and rationale.

  • `apply_hint` instructs the CLI to preview or apply diffs once approved.
  • `validation_summary` contains lint/test outcomes if evaluations ran.
  • `risk_rating` defaults to `medium` unless touching sensitive paths.