MCP tools
| Tool | Description |
|---|---|
list_tools | List all ~40 agent tools with their source file paths |
list_commands | List all ~50 slash commands with their source file paths |
get_tool_source | Read the full source of any tool (e.g. BashTool, FileEditTool) |
get_command_source | Read the source of any slash command (e.g. review, mcp) |
read_source_file | Read any file from src/ by relative path, with optional line range |
search_source | Regex search across the entire source tree, with optional file extension filter |
list_directory | List files and subdirectories under src/ |
get_architecture | Generate a high-level architecture overview from live source introspection |
Tool details
get_tool_source
get_tool_source
Reads the implementation of a named tool directory under
src/tools/.Required argument: toolName — the directory name, e.g. BashTool, FileEditTool, GrepTool.Optional argument: fileName — a specific file within the tool directory. If omitted, the server selects the main .ts or .tsx file automatically.get_command_source
get_command_source
Reads the implementation of a named slash command under
src/commands/.Required argument: commandName — the command name without the leading /, e.g. commit, review, mcp.Optional argument: fileName — a specific file when the command is a directory. If omitted for a directory command, the server lists the files in that directory.read_source_file
read_source_file
Reads any file under
src/ by relative path. Supports an optional line range.Required argument: path — relative path from src/, e.g. QueryEngine.ts, services/mcp/index.ts.Optional arguments: startLine and endLine (1-based). Omit both to read the entire file.search_source
search_source
Runs a regex search across the full source tree and returns matching lines with file paths and line numbers.Required argument:
pattern — a regular expression string.Optional arguments:filePattern— file extension filter, e.g..tsto restrict to TypeScript files.maxResults— maximum number of matches to return (default: 50).
list_directory
list_directory
Lists files and subdirectories under a
src/ path. Directories are returned with a trailing /.Required argument: path — relative path from src/. Pass an empty string "" to list the src/ root.MCP prompts
Prompts are guided templates. When invoked, the server loads relevant source files and returns a structured user message ready for an AI assistant to interpret.| Prompt | Description |
|---|---|
explain_tool | Deep-dive into how a specific tool works: input schema, permissions, and execution flow |
explain_command | Understand a slash command’s purpose, arguments, and implementation |
architecture_overview | Guided tour of the full Claude Code architecture |
how_does_it_work | Explain any subsystem by name (e.g. permissions, MCP client, bridge, query engine) |
compare_tools | Side-by-side comparison of two tools |
Prompt arguments
| Prompt | Required arguments |
|---|---|
explain_tool | toolName — e.g. BashTool, FileEditTool |
explain_command | commandName — e.g. commit, review, mcp |
architecture_overview | (none) |
how_does_it_work | feature — e.g. permission system, MCP client, bridge, query engine, skills, tasks, voice |
compare_tools | tool1 and tool2 — both tool directory names |
Example queries to try
"How does the BashTool work?"
"How does the BashTool work?"
Use the
explain_tool prompt with toolName: "BashTool". The server loads src/tools/BashTool/BashTool.ts, lists all files in that directory, and returns a structured explanation prompt covering purpose, input schema, permissions, execution flow, and output format."Search for where permissions are checked"
"Search for where permissions are checked"
Use
search_source with pattern: "checkPermission" or pattern: "bypassPermissions". The server returns up to 50 matching lines with file paths and line numbers across the entire src/ tree.You can also use the how_does_it_work prompt with feature: "permission system" for a guided explanation that pre-loads relevant files from src/utils/permissions/ and src/hooks/toolPermission/."Show me the /review command source"
"Show me the /review command source"
Use
get_command_source with commandName: "review". If the command is a single file, the full source is returned. If it is a directory, the server lists the files and you can request a specific one with the fileName argument.Alternatively, use the explain_command prompt with commandName: "review" for an AI-assisted breakdown."List all files in the bridge directory"
"List all files in the bridge directory"
Use
list_directory with path: "bridge". The server returns every file and subdirectory under src/bridge/, with directories marked by a trailing /.To understand what the bridge does, follow up with the how_does_it_work prompt using feature: "bridge"."Read QueryEngine.ts lines 1-100"
"Read QueryEngine.ts lines 1-100"
Use
read_source_file with path: "QueryEngine.ts", startLine: 1, and endLine: 100. Lines are returned with left-padded line numbers for easy reference.QueryEngine.ts is the core LLM API caller at ~46K lines — using line ranges is recommended for navigating it.