Skip to main content
MCP Documentation

Code Tools Service Guide

Search repositories, inspect symbols, and propose gated patches with evaluation hooks for safe code automation.

Reader capabilities

Semantic and regex search combine to locate relevant files quickly without leaving the local environment.

  • `code.search` accepts repo filters, owners, and path globs.
  • `code.read_file` streams syntax-highlighted snippets for review.
  • All reads respect workspace allowlists defined in policy settings.

Writer guardrails

Diff proposals are generated in an isolated staging area and require explicit approval before merging into your working tree.

  • `code.propose_patch` returns unified diffs plus reasoning notes.
  • Maximum diff size and change scopes are configurable per project.
  • Failed evaluations trigger automatic rollback of temporary worktrees.

Evaluation integration

Hook into `mcp-eval` to run unit tests or linting gates before a patch can be approved or landed.

  • `eval.run_unit_tests` executes inside configurable sandboxes.
  • `eval.score_qa` can grade generated explanations or documentation.
  • Results sync into the orchestrator for final decision making.