# MCP verb tools What each verb tool takes and answers. `src/mcp/types_tools.rs` is the authoritative list of tools (`VERB_TOOLS`) and of every argument, and `tests/mcp_smoke.rs` the live contract of each answer; where this table and the code disagree, the code wins. The rules every tool follows (exact arguments, paging, cuts, cursors, text encodings) are in the `mcp-surface` context of `.ai-rulez/context/mcp-surface.md`. | Tool | Arguments (required first; `?` = optional) | Job | |---|---|---| | `code_outline` | `path`, `limit?`, `cursor?`, `max_tokens?` | a file's symbols (kind, signature, 1-based `line` / `end_line`) and imports | | `code_symbols` | `name`, `kind?`, `path?`, `language?`, `fuzzy?`, `limit?`, `cursor?`, `max_tokens?` | find a definition by name; ranked exact, prefix, substring, then (with `fuzzy`) fuzzy subsequence; a row is `":: "` (`":: [; ]"` when the signature lacks the name), in rank order; `total` only beside `next_cursor`; files edited since the scan are listed in `stale`, their rows at the current `line` | | `code_read` | `path`, then `symbol?` (+ `line?` / `kind?` when several share the name) or `line?` + `end_line?` | one symbol's body, or a 1-based inclusive line span; cut after a whole line at 128 KiB (resume at `end_line + 1`); a single line longer than that is cut inside it | | `code_grep` | `pattern`, `regex?`, `path?`, `language?`, `context?`, `limit?`, `cursor?`, `max_tokens?` | exact text search over indexed code and text documents (markdown, config, data; not PDFs or Office files); literal unless `regex` (`^` / `$` then match at every line); `path` is a prefix, or a glob when it holds `*`; a filter no indexed file passes is an error; `skipped_files` counts unsearchable files; `hits` is `{"": {"": [": ", ...]}}` by innermost enclosing symbol (`""` outside every symbol), written in the text answer as `# ` and `## ` headers over the rows (ADR-0053), matches sharing a line one row `":,: "`, `context` N (0-10) lines around each hit as rows `"- "`, each once; a line over 400 bytes is cut around the match; `total` counts the matches from the cursor on, only beside `next_cursor` | | `code_search` | `query`, `lane?`, `path?`, `language?`, `limit?`, `cursor?`, `max_tokens?` | search code by meaning; returns pointers, not bodies; reports `lanes_ran` and `lanes_unavailable` (lane + reason) | | `code_refs` | `name`, `relation?`, `path?`, `line?`, `column?`, `match?`, `limit?`, `cursor?`, `max_tokens?` | usages: call sites of a name (matched by name: `resolution` says so; type uses and `use` lines are not call sites), callers of one definition (`path`: returns `definition` and `resolved_total` + per-hit `resolved`, or a `resolution` note: `unsupported for ` / `no resolution facts for this file`; add `line` when several definitions share the name), `implementations`, `importers` (with `path`: `by_depth`, `in_cycle` counting importers in a cycle with the file, `deeper: true` when more lie past `depth`), or the `definition` a reference binds to; `match` is `exact` (default: the identifier is the name, or a qualified path ending in it) or `substring`; a call site or implementation in a file edited since the scan has `stale` | | `find_files` | `query?`, `path?`, `language?`, `limit?`, `cursor?`, `max_tokens?` | fuzzy file-name search, or a listing without `query`; code and documents; `files` is a list of paths (with `min_lines`, `{"": }`, largest first) | | `docs_search` | `query`, `mime_type?`, `format?`, `path?`, `keywords?`, `entity?`, `limit?`, `cursor?`, `max_tokens?` | semantic search over indexed documents; `path` is a prefix, or a glob when it holds `*` | | `git_log` | `path?`, `query?`, `author?`, `symbol?`, `line?`, `rev?`, `limit?`, `cursor?`, `max_tokens?` | recent commits, a path's history, a commit search (`query` on the message, `author` on the author), a symbol's history (one window of commits per page, `next_cursor` continues past it), or one commit; a list row is `" "` (`" : "` when `author` is given; `[introduced]` / `[removed]` after the sha in a symbol's history); the recent and directory lists add `files: {"": {"": ""}}`; author, time and body come from `rev` | | `git_blame` | `path`, `line?` + `end_line?`, `symbol?`, `rev?`, `limit?`, `cursor?`, `max_tokens?` | per-line authorship of a file, a span, or one symbol (located at `rev`); `hunks` are `"[-] [ ]"`, adjacent lines of one commit merged (`limit` counts merged hunks), `commits` maps each sha to `author`, `time`, `summary` | | `git_diff` | `path?`, `from?`, `to?`, `structural?` | no arguments: working-tree status (200 paths per list; a `path` ending in `/` narrows it to that directory); `path`: that file's diff (`from` defaults to HEAD, `to` to the working tree); `structural`: symbols added and removed since `from` plus the `common` count, no `to`; at most 200 hunks or 128 KiB, then `truncated`; `binary` for a binary file; `lossy_text` when a hunk line is not UTF-8 (kept, its invalid bytes read as U+FFFD); a `path` in neither revision is an error | | `memory_save` | `key`, `value`, `tags?`, `visibility?` | write a durable note | | `memory_search` | `query?` or `key?` or `prefix?`, `tags?`, `visibility?`, `limit?`, `cursor?` | recall notes by meaning, by key, or by key prefix; a listing cut sets `scan_cap`; a `key` no note has answers `{"key":…,"found":false}` | | `index_status` | none | index health and repository identity (files per language, scan state, `cache_dir` for this workspace, `grammar_dir`, branch, HEAD) | | `index_rescan` | `paths?` | re-index the given files or directories (a directory's deleted files are pruned), or with none the whole workspace (unchanged files are skipped); a path neither on disk nor indexed, or outside the repository, is an error |