Pharaoh - Your AI breaks things it can't see
Pharaoh provides an MCP server for querying a codebase’s architectural knowledge graph without reading files directly.
Map a repository’s modules, dependencies, hotspots, and endpoints with
get_codebase_map.Get a full module profile before changing it with
get_module_context.Search for existing functions by name or concept with
search_functions.Assess what breaks before a change with
get_blast_radius.Find dead, possibly unused, or test-only code with
get_unused_code.Run several analysis queries in parallel with
pharaoh_recon.Check plan/live repo status, switch a free repo, or trigger a refresh with
pharaoh_account.
Integrates with GitHub through a dedicated App and webhooks to automatically map repositories and synchronize codebase changes for architectural analysis.
Provides structural intelligence for Python codebases, allowing agents to map module dependencies, search for functions, and trace execution paths.
Provides structural intelligence for TypeScript codebases, allowing agents to map module dependencies, search for functions, and trace execution paths.
@pharaoh-so/mcp
MCP proxy for Pharaoh — maps codebases into queryable knowledge graphs for AI agents.
Pharaoh gives AI coding assistants a complete architectural map of your codebase: every function, dependency, module, and connection. Instead of reading files one at a time, your AI agent queries the knowledge graph and gets instant answers about blast radius, unused code, dependency chains, and more.
This package enables Claude Code to connect to Pharaoh in headless environments (VPS, SSH, containers, CI) where a browser isn't available for OAuth. It acts as a stdio-to-SSE proxy, presenting itself as a local MCP server while relaying all communication to the remote Pharaoh server.
Quick Start
Step 1 — Authenticate
Run the proxy directly to trigger the device authorization flow:
npx @pharaoh-so/mcpThis displays a device code and a URL. Open the URL on any device (phone, laptop, tablet) and enter the code to authorize. Credentials are saved to ~/.pharaoh/credentials.json and remain valid for 7 days, with automatic re-authorization when they expire.
Step 2 — Add to Claude Code
npx @pharaoh-so/mcpVerify the connection:
claude mcp listYou should see pharaoh listed as a stdio server.
Switching from SSE
If you previously added Pharaoh as an SSE server, remove it first:
claude mcp remove pharaoh
npx @pharaoh-so/mcpRelated MCP server: Context7 MCP
How It Works
Claude Code ← stdio → @pharaoh-so/mcp ← SSE/HTTP → mcp.pharaoh.soThe proxy implements the Model Context Protocol (MCP) specification:
Claude Code launches the proxy as a child process and communicates via stdio (stdin/stdout)
The proxy authenticates with Pharaoh using stored credentials (or triggers device flow)
All MCP messages (tool calls, responses, notifications) are relayed to the remote Pharaoh server over SSE (Server-Sent Events)
Pharaoh queries the knowledge graph and returns architectural data to the proxy
The proxy forwards responses back to Claude Code via stdio
Authentication uses RFC 8628 (OAuth 2.0 Device Authorization Grant) — no browser is needed on the machine running Claude Code.
Available Tools
Once connected, Pharaoh provides these MCP tools:
Orient
Tool | What it answers |
| What modules exist and how do they relate? |
| What does this module look like before I modify it? |
| Does this function already exist somewhere? |
| Map, module context, search and blast radius in one call |
Investigate
Tool | What it answers |
| What breaks if I change this function/file/module? |
Manage
Tool | What it answers |
| Check plan, toggle PR Guard, trigger refresh |
| Org-level administration |
Inspect Mode
Use --inspect to dump the full tool manifest as JSON (useful for MCP registry validation and debugging):
npx @pharaoh-so/mcp --inspectThis outputs the complete list of tools with their schemas and exits immediately, without connecting to the server.
CLI Options
Usage: pharaoh-mcp [options]
Options:
--server <url> Pharaoh server URL (default: https://mcp.pharaoh.so)
--logout Clear stored credentials and exit
--inspect Output tool manifest as JSON and exit
--help Show help
--version Show version numberConfiguration
Credentials
Credentials are stored at ~/.pharaoh/credentials.json with 0600 permissions (owner-read/write only). The file contains:
Access token — used to authenticate MCP requests
Refresh token — used to obtain new access tokens when they expire
Expiry timestamp — tokens are refreshed automatically before expiration
To clear credentials:
npx @pharaoh-so/mcp --logoutCustom Server
For self-hosted Pharaoh instances or development, register manually, pinned to a version (npx @pharaoh-so/mcp --version prints the one you have):
claude mcp add --scope user pharaoh -- npx @pharaoh-so/mcp@<version> --server https://your-pharaoh-instance.comEnvironment Variables
Variable | Default | Description |
|
| Pharaoh server URL (alternative to |
Requirements
Node.js >= 18
Claude Code or any MCP-compatible AI client
A Pharaoh account — sign up at pharaoh.so
Security
Credentials are stored with restrictive file permissions (
0600— owner-read/write only)Authentication uses the RFC 8628 device authorization flow — no secrets are embedded in the package
All communication with the Pharaoh server uses HTTPS/TLS
The proxy never reads or sends your local files. Pharaoh reads your code from GitHub through its GitHub App, maps it into a knowledge graph of structural metadata (function names, file paths, dependency relationships), and deletes the clone when mapping ends.
Tokens expire after 7 days and are refreshed automatically
Only use trusted server URLs — the proxy sends your auth token to the configured server
No telemetry. The proxy's only network calls are the device flow, token refresh, the MCP connection, and one registry lookup during interactive setup (below).
What the installer writes on your machine
npx @pharaoh-so/mcp in a terminal is the interactive setup. Every later proxy start (Claude Code launching the server) repeats the plugin, skill and command steps so a new version takes effect, and nothing else.
Path | Mode | When | What |
|
| Always | Credentials and the Claude Code plugin marketplace |
|
| After sign-in | Access token, refresh token, expiry |
| — |
| The one-plugin marketplace Claude Code installs as |
| — |
| Slash commands. A file is written only when it is absent or is Pharaoh's: it carries the front-matter comment |
| — | Interactive setup | Removes earlier |
| — | Interactive setup, and only if the file already exists | Adds to |
| — |
| The review skill for Codex ( |
| — |
| Skills prefixed |
Versions 0.3.46 and earlier wrote one rule, mcp__pharaoh, on every proxy start. That prefix auto-approved every Pharaoh tool, including account deletion and pharaoh_admin, so a prompt injection could run them without a human prompt. The next interactive setup replaces that rule with the list above; account deletion, pharaoh_admin and any tool not listed prompt before they run. To take the blanket rule out by hand, delete mcp__pharaoh from permissions.allow.
Pinned version and upgrades
Every registration the setup writes runs the exact version that wrote it (npx @pharaoh-so/mcp@<version>). A new release on npm changes nothing on your machine until you upgrade:
npx @pharaoh-so/mcp@latestThis signs you in again, rewrites the registration with the new version and refreshes the plugin. The interactive setup asks the npm registry for the newest version and prints a one-line hint when there is one; proxy starts never check.
Reporting Vulnerabilities
If you discover a security vulnerability, please report it responsibly by emailing security@pharaoh.so. Do not open a public issue.
Troubleshooting
"Connection refused" or "ECONNREFUSED"
The Pharaoh server may be temporarily unavailable. Check status.pharaoh.so or try again in a few minutes.
"Token expired" or "401 Unauthorized"
Re-authenticate by running the proxy directly:
npx @pharaoh-so/mcpOr clear credentials and start fresh:
npx @pharaoh-so/mcp --logout
npx @pharaoh-so/mcp"pharaoh" not showing in claude mcp list
Make sure you added it with the correct command:
npx @pharaoh-so/mcpNote the -- separator between pharaoh and npx.
Device code not working
Ensure you're opening the URL on a device with browser access
The device code expires after 15 minutes — request a new one by re-running the command
Check that you're logged into GitHub when authorizing
Slow startup
The first run after installation may take a moment as npm downloads the package. Subsequent runs use the cached version. To pre-install globally:
npm install -g @pharaoh-so/mcp
claude mcp add --scope user pharaoh -- pharaoh-mcpHow Pharaoh Works
Pharaoh parses your repositories using tree-sitter and maps structural metadata into a Neo4j knowledge graph. The graph contains:
Functions — names, signatures, complexity scores, export visibility
Files — paths, module membership, language classification
Modules — logical groupings detected from directory structure
Dependencies — import/export relationships, call chains, module connections
Vision specs — PRD/spec documents linked to implementation
No source code is stored — only structural metadata. When an AI agent queries Pharaoh, it gets architectural facts in minimal tokens, not raw code dumps. This means your AI assistant can understand your entire codebase architecture without consuming its context window reading files one by one.
Supported Languages
TypeScript / JavaScript — full support (functions, classes, imports, exports, JSX)
Python — full support (functions, classes, imports, decorators)
More languages planned via tree-sitter grammar support
Contributing
Contributions are welcome. Please open an issue first to discuss what you'd like to change.
Fork the repository
Create your feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
License
MIT -- Pharaoh, Inc.
Links
Available Tools
7 toolsget_blast_radiusARead-only
What breaks if you change a function, file or module.
CALL THIS WHEN: • You're about to change a signature, refactor or delete code • You need callers or detected endpoints a change reaches
RETURNS: Risk, production callers by module/file, endpoints, cron jobs and DB operations. Hops are the shortest detected path within the requested depth (1–5). Test-file callers are excluded.
USE INSTEAD OF: following callers by hand.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name — one of your connected repos. | |
| depth | No | How many hops to trace (default: 3, range: 1–5) | |
| entity | Yes | Function name, file path, or module name | |
| entity_type | Yes | Type of entity |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Beyond the readOnlyHint/destructiveHint annotations, the description discloses the return payload shape (risk, production callers by module/file, endpoints, cron jobs, DB operations), the cost-limiting semantics of hops and the depth range, and the important exclusion of test-file callers. That is real behavioral context an agent cannot get from the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the core question, then clearly labeled CALL THIS WHEN, RETURNS, and USE INSTEAD OF sections. Each line carries distinct information, and the hop/exclusion caveats sit inside RETURNS where they belong.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, and the description compensates by enumerating the returned fields, the depth semantics, and the test-file exclusion. For a 4-parameter read-only analysis tool, an agent has everything needed to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the baseline is 3, but the description adds meaning the schema does not: hops are the 'shortest detected path' within the requested depth, and test-file callers are filtered out. It does not clarify the entity/entity_type pairing or the repo scoping beyond what the schema says.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening line 'What breaks if you change a function, file or module' names the exact analysis performed and the entity types it accepts, so an agent can recognize impact analysis immediately. It does not explicitly distinguish itself from close siblings like get_module_context or search_functions, which keeps it short of a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
A dedicated 'CALL THIS WHEN' block gives the triggering conditions (about to change a signature, refactor or delete; need callers or endpoints), and 'USE INSTEAD OF: following callers by hand' names the manual alternative it replaces. Nothing is left to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_codebase_mapARead-only
A repo's architecture in one call.
CALL THIS WHEN: • You need a repo's overall structure, or which module owns something • You don't know the repo's exact name in Pharaoh
RETURNS: Modules with file counts and LOC, module dependencies with two-way ones flagged, the files changed most in 90 days, and every endpoint with its handler file.
USE INSTEAD OF: directory listings, which omit dependency relationships.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name — one of your connected repos. | |
| include_metrics | No | Include LOC, complexity, change frequency |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds real value beyond that by disclosing the composition of the result set (flagged two-way dependencies, 90-day change frequency, endpoint-to-handler mapping), which tells the agent this is a single synthesized read rather than a raw listing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line summary, then labeled WHEN / RETURNS / USE INSTEAD OF sections with no filler. Every line carries actionable information and the structure lets an agent scan to the relevant part immediately.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description correctly carries the burden of describing returns and does so concretely. It leaves minor gaps around scale behavior (large repos, truncation) and the name-resolution path it advertises, but an agent has enough to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters are already documented in the schema and the baseline of 3 applies. The description does not clarify how to resolve an unfamiliar 'repo' name despite flagging that case as a use reason, and never mentions include_metrics or what omitting it costs.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb+resource ('a repo's architecture in one call') and enumerates the concrete content: modules with file counts/LOC, dependencies, hot files, endpoints with handlers. It differentiates from directory listings, but does not distinguish itself from siblings like get_module_context or get_blast_radius, which overlap on module-level questions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
An explicit 'CALL THIS WHEN' block gives two clear triggering conditions (need overall structure / which module owns something; don't know the repo's exact name), which is strong positive guidance. It names a non-tool alternative ('directory listings') but gives no exclusions or pointers to the actual sibling tools an agent should weigh it against.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_module_contextARead-only
One module's full profile before you change it, in about 2K tokens.
CALL THIS WHEN: • You're about to change code in a module, or plan a change to it • You need what a module exports, depends on, or who calls into it
RETURNS: Files, LOC, exported signatures with complexity, imports in and out, DB tables, endpoints, cron jobs, env vars, and callers in other modules.
USE INSTEAD OF: reading every module file; callers can live elsewhere.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name — one of your connected repos. | |
| module | Yes | Module name (e.g., "crons", "slack", "db") |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already cover the safety profile (readOnlyHint=true, destructiveHint=false), so the bar is lower; the description still adds real value by quoting a cost budget (~2K tokens) and enumerating the exact payload (files, LOC, signatures with complexity, imports, DB tables, endpoints, crons, env vars, callers). It stops short of noting size limits on very large modules or whether output is truncated.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded with the one-line value proposition and a cost estimate, then sectioned into WHEN / RETURNS / INSTEAD OF. Every block earns its place and nothing is restated.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only two required params, no output schema, and no nested objects, the description covers everything an agent needs: trigger conditions, a token-cost expectation, and a full enumeration of the return contents. Nothing material is left to guesswork.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% — both `repo` and `module` are documented in the schema, including an example value for module. The description adds no syntax, naming, or format guidance beyond that, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Names a specific resource (one module's full profile) and frames the intent around pre-change reconnaissance, which is distinct from `get_codebase_map` (whole repo) or `search_functions` (targeted lookup). However it never names a sibling tool, so an agent must infer whether `get_blast_radius` or `pharaoh_recon` overlaps. Clear purpose, but sibling differentiation is implicit rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'CALL THIS WHEN' block gives two concrete triggering conditions (about to change a module; need exports/deps/callers) and 'USE INSTEAD OF' rules out reading files directly. What is missing is an explicit pointer to the actual sibling tools it supersedes or defers to — 'reading every module file' is a manual workflow, not a tool, so the routing decision against `get_blast_radius` remains unstated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_unused_codeARead-only
Find code nothing runs: functions no production entry point (endpoint, CLI command, cron job, event handler, worker, entry file) reaches. Pass functions to check whether specific functions are wired in.
CALL THIS WHEN: • Before cleaning up a module or deleting a function • After merging new code, to confirm an entry point reaches it
RETURNS:
• Dead: unreached, named in no other file, and no production file imports its file. Safe to delete.
• Possibly unused: unreached, but named in other files (string dispatch, dynamic loading) or its file is imported. Listed with the files that name it; check before deleting.
• Used only by tests: exported functions and class methods only test files reference.
With functions: each one's status, and the call path from an entry point when it's reachable.
USE INSTEAD OF: reference searches; references do not prove code runs.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name — one of your connected repos. | |
| module | No | Limit to one module | |
| functions | No | Function names or Class.method names to check instead of listing everything unused |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description goes further by defining the Dead/Possibly unused/Used only by tests categories and the caveat about string dispatch and dynamic loading, which materially affects how an agent should act on results. It does not, however, discuss scale or latency for large repos, and it partially duplicates the return-value content that would normally belong to an output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The purpose is front-loaded in the first sentence and the CALL THIS WHEN / RETURNS / USE INSTEAD OF sections make it scannable. It is slightly longer than strictly necessary, since the RETURNS section restates details that an output schema would normally carry, but nothing is filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no output schema, the description does a good job of explaining the three result categories and the `functions`-mode response. What is missing for a repo-wide analysis tool is any sense of cost or latency on large codebases, and the `module` scoping parameter is never mentioned in prose, leaving a gap in an otherwise complete picture.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% (all three parameters are described in the schema), so the baseline is 3. The description adds meaning for `functions` by framing it as a targeted check that returns status plus a call path from an entry point, but `module` and `repo` are left entirely to the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: find functions no production entry point (endpoint, CLI command, cron job, event handler, worker, entry file) reaches. It enumerates the exact classes of entry points that count, which lets an agent distinguish this from sibling tools like search_functions or get_codebase_map without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It gives an explicit CALL THIS WHEN section with two concrete triggers (before cleanup, after merging), plus a USE INSTEAD OF directive that names the alternative approach (reference searches) and the reason references are insufficient. When and why-not are both stated directly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pharaoh_accountA
Your Pharaoh plan, live repo and refreshes.
Pick one action and provide its fields; invalid combinations are rejected.
• status: each workspace's plan and live repo, the upgrade link, the setup page • set_free_repo { repo }: change a free workspace's live repo • refresh_repo { repo, full? }: re-map one live repo now
CALL THIS WHEN: • You want to know what plan you're on or which repo is live • A repo doesn't answer because it isn't live, or you want to switch which one is • You want to upgrade so every repo is live, or manage billing • You want a repo's graph refreshed before its next push
Flag reference: full = force a full rebuild, skipping the delta refresh.
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | Used by: refresh_repo. Force a full rebuild, skipping the delta refresh. | |
| repo | No | Used by: set_free_repo (required), refresh_repo (required). Repo slug (owner/repo). | |
| action | Yes | Which account action to perform |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations declare readOnlyHint=false and destructiveHint=false, and the description adds real behavioral context: invalid action/field combinations are rejected, and set_free_repo changes which repo is live while refresh_repo re-maps immediately. It doesn't note permission requirements or what happens to in-flight pushes during a refresh, so it stops short of the top.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line summary, a compact per-action bullet list, a when-to-use block, and a flag glossary. Every section serves a distinct purpose with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a three-action dispatcher with no output schema, the description covers what each action does, what status returns (plan, live repo, upgrade link, setup page), and the flag semantics. An agent has everything needed to pick an action and populate fields correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the schema already tags each field with 'Used by: …' and the repo slug format. The description restates the per-action field mapping and the meaning of 'full' almost verbatim from the schema, so it adds little beyond the structured data.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific resource domain (plan, live repo, refreshes) and enumerates each of the three actions with what it does: status reads plan/live repo, set_free_repo changes a free workspace's live repo, refresh_repo re-maps a repo. The sibling tools are all code-analysis utilities, so the account-management scope is unmistakably distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
A dedicated 'CALL THIS WHEN' block lists four concrete triggering conditions, including the failure mode ('A repo doesn't answer because it isn't live') that selects set_free_repo. It also implies when to use refresh_repo versus status, leaving little to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
pharaoh_reconARead-only
Several Pharaoh queries in one call, run in parallel: codebase map, module profiles, function searches, blast radius and module dependency paths.
CALL THIS WHEN: • Planning a change, reviewing a PR or assessing architecture, when you know what to check
RETURNS: Each requested section in one response. Per call: up to 5 modules, 3 searches, 3 blast radius targets, 3 dependency pairs.
USE INSTEAD OF: separate tool calls and file reads.
| Name | Required | Description | Default |
|---|---|---|---|
| repo | Yes | Repository name — one of your connected repos. | |
| modules | No | Modules to profile (max 5) | |
| functions | No | Function searches (max 3) | |
| include_map | No | Include the codebase map (default true) | |
| blast_radius | No | Blast radius targets (max 3) | |
| dependencies | No | Module pairs to trace a dependency path between (max 3) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context: queries execute in parallel, results come back as 'each requested section in one response,' and per-call caps are enumerated. It stops short of describing failure modes (e.g., what happens if one section errors) or payload size.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-sentence purpose, then clearly labeled CALL THIS WHEN / RETURNS / USE INSTEAD OF sections. Every sentence carries distinct information: what it does, when to fire it, what comes back, and what it replaces.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a six-parameter batch tool with no output schema, the description is nearly sufficient: it explains that each requested section returns in one response and sets per-call limits. Some ambiguity remains about what a 'module profile' or 'codebase map' section actually contains, but annotations and full schema coverage fill most of the gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so every parameter including the nested blast_radius and dependencies objects is already documented in the schema. The description's per-call caps ('up to 5 modules, 3 searches, 3 blast radius targets, 3 dependency pairs') echo the schema's max annotations rather than adding new semantics. Baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb+resource (batched Pharaoh queries) and enumerates exactly which five query types it runs in parallel: codebase map, module profiles, function searches, blast radius, and dependency paths. An agent can distinguish it from every sibling (get_codebase_map, get_blast_radius, search_functions, etc.) without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
'CALL THIS WHEN: Planning a change, reviewing a PR or assessing architecture, when you know what to check' gives explicit activation conditions, and 'USE INSTEAD OF: separate tool calls and file reads' names the alternatives it displaces. The qualifier 'when you know what to check' implicitly routes open-ended exploration elsewhere.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_functionsARead-only
Find functions by name or concept across the whole codebase.
CALL THIS WHEN: • You're about to write a function, helper or utility: check it doesn't already exist • You need to know where something is implemented (e.g. "retry", "validate", "notify")
RETURNS: Matching functions with file path, line range, module, signature, export status and complexity.
USE INSTEAD OF: grep, which misses aliases and re-exports and includes comments.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Only this file (full path matches exactly, a file name as a substring) | |
| repo | Yes | Repository name — one of your connected repos. | |
| limit | No | Max results (default 20, max 50) | |
| query | Yes | Function name or part of one | |
| module | No | Only this module | |
| offset | No | Results to skip (default 0) | |
| exported_only | No | Exported functions only (default false) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered; the description adds value beyond that by disclosing the exact return payload fields (file path, line range, module, signature, export status, complexity). It does not mention pagination/limit behavior or ranking/relevance ordering, which is the remaining gap for a search tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded one-line purpose followed by three short labeled blocks (when, returns, alternative). No filler sentences; every line adds decision-relevant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 7 parameters, no output schema, and only read-only annotations, the description compensates well: it explains the return shape, the intent, and the alternative tool. Nothing an agent needs to select or invoke it correctly appears to be missing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so every parameter (file, repo, limit, query, module, offset, exported_only) is already documented in structured form; the description only loosely implies 'name or concept' matching for query. Baseline 3 is appropriate since the schema carries the parameter burden.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Find functions') with explicit scope ('by name or concept across the whole codebase'), and the returns line clarifies it's a semantic/keyword search rather than a structural map like get_codebase_map. An agent can distinguish it from grep and from the sibling recon tools without opening a schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The 'CALL THIS WHEN' block gives two concrete triggering scenarios (pre-writing a helper, locating an implementation) and names the concrete alternative to avoid ('USE INSTEAD OF: grep'), including the reason grep fails (misses aliases and re-exports, includes comments). That is explicit when/when-not guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
21 tool updates
v0.1.1- Removed
check_reachability - Changed
get_blast_radius6 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / depthAdded value: +{ + "description": "How many hops to trace (default: 3, range: 1–5)", + "maximum": 5, + "minimum": 1, + "type": "integer" +} - added
Input schema / properties / entityAdded value: +{ + "description": "Function name, file path, or module name", + "type": "string" +} - added
Input schema / properties / entity_typeAdded value: +{ + "description": "Type of entity", + "enum": [ + "function", + "file", + "module" + ], + "type": "string" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Repository name — one of your connected repos.", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "repo", + "entity", + "entity_type" +]
- Changed
get_codebase_map4 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / include_metricsAdded value: +{ + "description": "Include LOC, complexity, change frequency", + "type": "boolean" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Repository name — one of your connected repos.", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "repo" +]
- Removed
get_consolidation_opportunities - Removed
get_cross_repo_audit - Removed
get_design_system - Changed
get_module_context4 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / moduleAdded value: +{ + "description": "Module name (e.g., \"crons\", \"slack\", \"db\")", + "type": "string" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Repository name — one of your connected repos.", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "repo", + "module" +]
- Removed
get_pharaoh_docs - Removed
get_regression_risk - Removed
get_test_coverage - Changed
get_unused_code5 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / functionsAdded value: +{ + "description": "Function names or Class.method names to check instead of listing everything unused", + "items": { + "type": "string" + }, + "maxItems": 20, + "type": "array" +} - added
Input schema / properties / moduleAdded value: +{ + "description": "Limit to one module", + "type": "string" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Repository name — one of your connected repos.", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "repo" +]
- Removed
get_vision_docs - Removed
get_vision_gaps - Removed
map_open_source_repo - Changed
pharaoh_account5 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / actionAdded value: +{ + "description": "Which account action to perform", + "enum": [ + "status", + "set_free_repo", + "refresh_repo" + ], + "type": "string" +} - added
Input schema / properties / fullAdded value: +{ + "description": "Used by: refresh_repo. Force a full rebuild, skipping the delta refresh.", + "type": "boolean" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Used by: set_free_repo (required), refresh_repo (required). Repo slug (owner/repo).", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "action" +]
- Removed
pharaoh_feedback - Changed
pharaoh_recon8 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / blast_radiusAdded value: +{ + "description": "Blast radius targets (max 3)", + "items": { + "properties": { + "entity": { + "description": "Function, file or module name", + "type": "string" + }, + "entity_type": { + "description": "Default: function", + "enum": [ + "function", + "file", + "module" + ], + "type": "string" + } + }, + "required": [ + "entity" + ], + "type": "object" + }, + "type": "array" +} - added
Input schema / properties / dependenciesAdded value: +{ + "description": "Module pairs to trace a dependency path between (max 3)", + "items": { + "properties": { + "from": { + "type": "string" + }, + "to": { + "type": "string" + } + }, + "required": [ + "from", + "to" + ], + "type": "object" + }, + "type": "array" +} - added
Input schema / properties / functionsAdded value: +{ + "description": "Function searches (max 3)", + "items": { + "type": "string" + }, + "type": "array" +} - added
Input schema / properties / include_mapAdded value: +{ + "description": "Include the codebase map (default true)", + "type": "boolean" +} - added
Input schema / properties / modulesAdded value: +{ + "description": "Modules to profile (max 5)", + "items": { + "type": "string" + }, + "type": "array" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Repository name — one of your connected repos.", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "repo" +]
- Removed
query_dependencies - Removed
request_upload - Changed
search_functions9 fields changed- added
Input schema / $schemaAdded value: +"http://json-schema.org/draft-07/schema#" - added
Input schema / properties / exported_onlyAdded value: +{ + "description": "Exported functions only (default false)", + "type": "boolean" +} - added
Input schema / properties / fileAdded value: +{ + "description": "Only this file (full path matches exactly, a file name as a substring)", + "type": "string" +} - added
Input schema / properties / limitAdded value: +{ + "description": "Max results (default 20, max 50)", + "type": "number" +} - added
Input schema / properties / moduleAdded value: +{ + "description": "Only this module", + "type": "string" +} - added
Input schema / properties / offsetAdded value: +{ + "description": "Results to skip (default 0)", + "type": "number" +} - added
Input schema / properties / queryAdded value: +{ + "description": "Function name or part of one", + "maxLength": 500, + "type": "string" +} - added
Input schema / properties / repoAdded value: +{ + "description": "Repository name — one of your connected repos.", + "type": "string" +} - added
Input schema / requiredAdded value: +[ + "repo", + "query" +]
- Removed
setup_environment
21 tool updates
v0.1.0- First observed
check_reachability - First observed
get_blast_radius - First observed
get_codebase_map - First observed
get_consolidation_opportunities - First observed
get_cross_repo_audit - First observed
get_design_system - First observed
get_module_context - First observed
get_pharaoh_docs - First observed
get_regression_risk - First observed
get_test_coverage - First observed
get_unused_code - First observed
get_vision_docs - First observed
get_vision_gaps - First observed
map_open_source_repo - First observed
pharaoh_account - First observed
pharaoh_feedback - First observed
pharaoh_recon - First observed
query_dependencies - First observed
request_upload - First observed
search_functions - First observed
setup_environment
TDQS
Scored across 7 tools
Most tools target clearly distinct questions: architecture map, module profile, blast radius, function search, dead code, account. The only real overlap is pharaoh_recon, which bundles codebase map, module profiles, searches, and blast radius, so an agent might hesitate between it and the individual tools. The descriptions do mitigate this with explicit 'call this when' guidance, but the batch wrapper is inherently a superset of other tools.
Mostly consistent snake_case with a verb-first pattern (get_codebase_map, get_module_context, get_blast_radius, search_functions, get_unused_code). The two pharaoh_-prefixed tools (pharaoh_recon, pharaoh_account) break the verb_noun convention slightly, but remain readable and logically clustered as server-management operations.
Seven tools is well-scoped for a codebase-intelligence server, and each tool earns its place: map, module context, impact analysis, function search, dead-code detection, batch recon, and account management. No padding or obviously trivial tool.
Coverage is strong for architecture understanding, change impact, function discovery, and unused-code cleanup. The notable gap is that none of the tools return actual source code bodies or line contents—agents can locate and assess functions but cannot read the implementation, which may force a fallback to another file-access mechanism.
Maintenance
Related MCP Connectors
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Give your AI agent a persistent map of your project's structure, dependencies, and bugs.
Code intelligence platform for AI agents. 20 tools for architecture, security & impact analysis.
- PharaohOAuthso.pharaoh
Codebase knowledge graph — architectural awareness for AI coding agents via MCP
Related MCP Servers
AlicenseAqualityAmaintenanceA remote Model Context Protocol server acting as middleware to the Sentry API, allowing AI assistants like Claude to access Sentry data and functionality through natural language interfaces.742 npm952MIT- AlicenseAqualityAmaintenanceA Model Context Protocol server that fetches up-to-date, version-specific documentation and code examples from libraries directly into LLM prompts, helping developers get accurate answers without outdated or hallucinated information.82394,752 npm63,985MIT
- AlicenseNot gradedqualityDmaintenanceThis read-only MCP Server allows you to connect to GitHub data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).MIT
- AlicenseNot gradedqualityFmaintenanceProvides AI-enhanced code search capabilities by integrating with Sourcegraph, allowing AI assistants to search across multiple repositories and codebases with advanced query syntax.42MIT