reference-mcp
The reference-mcp server helps AI agents deeply understand and navigate Python codebases by building a tree-sitter index and exposing structured tools for code exploration:
repo_overview— High-level summary of the repository: languages, layout, file/LOC/symbol counts, entry points, tests, config files, and frameworks.get_file_outline— View the symbol skeleton (classes, methods, functions, variables with line numbers) of a file or directory without reading full source bodies.find_symbol— Locate where a function, class, method, or variable is defined, with optional full source and "did you mean" suggestions.find_references— Find every usage/call site of a symbol across the repo with file:line context.trace_call_graph— Trace callers or callees of a function to N levels, returning an indented call tree with file:line references.get_type_hierarchy— Visualize a class's full type hierarchy: superclasses upward and subclasses/Protocol-ABC implementations downward.search_code— Search via exact text, regex, or natural-language semantic queries (e.g., "where is auth handled?"), with path glob filtering and pagination.get_dependencies— Show what a file imports (internal vs. external) and which files depend on it (blast radius).code_history— Explore git blame, recent commits, churn stats, and author history for a file or specific line range to understand why code exists.find_tests— Map a symbol to the tests that cover it, or a test file to the symbols it exercises.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@reference-mcpwhat is this project about?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
reference-mcp
An MCP server whose tools help an AI agent comprehend a codebase — get oriented, navigate by meaning rather than text, trace relationships, and understand why code is shaped the way it is.
It builds its own tree-sitter index of a Python project (no language servers required) and exposes a small set of consolidated, high-leverage tools designed around current agent tool-design best practices: human-readable returns, built-in token budgeting and pagination, and actionable errors.
Tools
Tool | What it answers |
| "What is this project?" — languages, layout, entry points, tests, configs. |
| "What's in this file?" — symbol skeleton without reading bodies. |
| "Where is X defined?" — locate a function/class/method/var, optionally with body. |
| "Where is X used?" — call sites and usages with context. |
| "Where is the code that …?" — lexical/regex search, or natural-language semantic search (optional). |
| "What does this import / what depends on it?" — forward and reverse deps. |
| "Why is this code here?" — git blame/log/churn for a symbol or region. |
| "What tests cover this?" — symbol ⇄ test mapping. |
| "What calls this / what does it call?" — callers/callees to N levels. |
| "What's the class tree?" — subclasses, superclasses, implementations. |
Related MCP server: codeweave-mcp
Quickstart
uv sync --extra dev
# Point the server at a codebase and run it over stdio:
REFERENCE_MCP_REPO=/path/to/your/project uv run reference-mcp
# Or inspect interactively:
npx @modelcontextprotocol/inspector uv run reference-mcpSemantic search (optional)
Lexical search works out of the box. To also enable natural-language search ("where is auth handled?"), install the local-embeddings extra — no API key, no network at query time once the model is cached:
uv sync --extra semanticThen call search_code with mode="semantic". It embeds each symbol
(name + signature + docstring) with fastembed
(ONNX, model BAAI/bge-small-en-v1.5 by default, override via
REFERENCE_MCP_EMBED_MODEL), caches the vectors in the index cache dir, and ranks
by cosine similarity. Without the extra, mode="semantic" returns install guidance
instead of failing.
Register with an MCP client
{
"mcpServers": {
"reference": {
"command": "uv",
"args": ["run", "reference-mcp"],
"env": { "REFERENCE_MCP_REPO": "/path/to/your/project" }
}
}
}Configuration
Env var | Default | Purpose |
| cwd | Absolute path to the codebase to analyze. |
|
| Where the SQLite index is stored (never inside your repo). |
|
| Soft per-response token cap. |
Design notes
Read-only. The server never edits your code; it only reads and indexes it.
Incremental index. Files are re-parsed only when their content hash changes.
Precision tradeoff. Reference/call-graph resolution is scope- and import-aware name matching, not full type inference. Accurate for most Python; a future LSP backend can slot in behind the same tool surface for dynamic-dispatch-heavy code. To curb false positives,
find_referencesignores matches inside strings/comments (tree-sitter span masking), andtrace_call_graphdrops anobj.method()call when its name matches several methods. The residual case it cannot resolve: anobj.method()call whose name matches exactly one project method of an unrelated type (e.g. adict.get()call when the project defines a singlegetmethod) — undecidable without type inference.
Development
uv run ruff check . # lint
uv run ruff format . # format
uv run mypy # type-check (src/)
uv run pytest # unit + integration tests
uv run python evals/run_evals.py # eval harness (must be 100%)CI runs all of the above on every push and PR (see .github/workflows/ci.yml).
Available Tools
10 toolscode_historyA
Explain WHY code looks the way it does using git: recent commits touching a file, churn stats (commit count, authors, age), and optional line-range blame.
Provide start_line/end_line to get blame for a specific region. Requires the
repo to be a git checkout.
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Repo-relative file path. | |
| start_line | No | Start line for blame (optional). | |
| end_line | No | End line for blame (optional). | |
| max_commits | No | How many recent commits to list. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full transparency burden. It discloses the requirement for a git checkout, optional line-range blame, and the nature of outputs. It does not mention error cases or performance, but overall provides adequate behavioral context.
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 description is two sentences with no wasted words. The first sentence immediately conveys the tool's purpose and outputs. It is well-structured and front-loaded, making it easy to parse.
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?
Given the 4 parameters, 100% schema coverage, and the presence of an output schema, the description does not need to detail return values. It covers key behaviors (blame, prerequisite) and mentions churn stats. It is complete enough for the complexity level, though it could briefly mention how to use max_commits.
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%, giving a baseline of 3. The description adds value by explaining that start_line/end_line enable blame on a specific region, which enriches the schema descriptions. It also clarifies the prerequisite (git checkout) implicitly linking to the file parameter.
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 uses a specific verb ('explain') and resource ('why code looks the way it does using git'), listing concrete outputs (commits, churn stats, blame). It clearly distinguishes from sibling tools like find_references or search_code, which serve different purposes.
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 description implies when to use (to understand git history of a file) and mentions a prerequisite (git checkout). However, it lacks explicit guidance on when not to use this tool or direct comparisons to siblings, which limits its utility for an AI agent deciding between tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_referencesA
Find every USE-SITE of a symbol (calls, attribute access, imports) across the repo, each with file:line and the source line.
Resolution is scope/import-aware name matching, not full type inference — very
accurate for module-level functions/classes; methods may include same-named
calls on unrelated types. Use find_symbol to see where it is defined instead.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Symbol name whose usages you want. | |
| include_definitions | No | Also include the definition sites in results. | |
| limit | No | Max references to return. | |
| offset | No | Pagination offset. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses important behavioral traits: resolution is scope/import-aware name matching (not full type inference), very accurate for module-level functions/classes, but methods may include same-named calls on unrelated types. This is good transparency about false positive risks. It does not mention rate limits or auth, but as a read operation, that is acceptable.
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 description is concise and well-structured. The first sentence states the core purpose, and subsequent sentences explain resolution details and limitations. Every sentence adds value, and there is no redundant or extraneous text.
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?
Given that the tool has a rich output schema (true in context signals), the description does not need to explain return values. It covers the essential aspects: what is found (calls, attribute access, imports), output format (file:line and source line), and accuracy. It could mention pagination behavior explicitly, but parameters cover limit/offset. Overall, it is sufficiently complete for an agent to use 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% (all four parameters have descriptions in the input schema). The tool description does not add additional semantic information beyond what the schema already provides. Baseline is 3 when schema covers parameters well and description adds no extra parameter context.
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 clearly states the tool finds every use-site of a symbol (calls, attribute access, imports) with file:line and source line. It distinguishes itself from sibling find_symbol by explicitly noting that find_symbol is for definitions, so the agent knows which tool to use for references vs definitions.
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 description provides explicit guidance: 'Use find_symbol to see where it is defined instead.' This tells the agent when not to use this tool. It also explains the resolution approach (scope/import-aware name matching) and accuracy limitations for methods, which helps set appropriate expectations for when to rely on results.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_symbolA
Locate where a function/class/method/variable is DEFINED.
Returns each definition's kind, qualified name, and 'path:line'. With
include_body=True, also returns the full source of each match. If nothing
matches you get 'did you mean' suggestions.
Do NOT use to find usages/call sites — use find_references. Do NOT use for
free-text search — use search_code.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Bare name ('connect') or dotted suffix ('Client.connect'). | |
| kind | No | Optional filter: class|function|method|variable|constant. | |
| include_body | No | Include full source body of each match (costs tokens). | |
| response_format | No | 'concise' or 'detailed'. | concise |
| limit | No | Max matches to return. | |
| offset | No | Pagination offset. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It discloses that include_body=True returns full source and costs tokens, which is a behavioral trade-off for agents. It also implies read-only operation by describing a find/locate action. However, it does not explicitly state idempotency or absence of side effects, nor does it mention rate limits or auth requirements, leaving minor gaps.
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 description is four sentences long, front-loaded with the primary purpose in the first sentence. Every sentence earns its place: purpose, return content, include_body option, and usage exclusions. There is no redundant phrasing, and the text is structured for quick scanning.
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?
Given the tool has 6 parameters, an output schema (not shown but present), and no annotations, the description provides all essential context: what it does, what it returns, how to paginate (via implicit schema parameters), trade-off of include_body, and error handling ('did you mean'). The output schema likely covers return structure, so the description does not need to. It is complete for effective agent use.
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% (all 6 parameters documented in schema). The tool description adds value beyond schema by explaining name as 'bare name or dotted suffix' and include_body as 'costs tokens' and returns full source. It does not elaborate on limit, offset, or response_format, but the schema sufficiently describes them, so the description incrementally improves parameter understanding.
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 clearly states the tool locates definitions of functions/classes/methods/variables. It specifies return content (kind, qualified name, path:line) and distinguishes from siblings by explicitly saying not to use for usages/call sites (use find_references) or free-text search (use search_code). The verb 'locate' paired with resource 'definitions' is precise and unambiguous.
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 description provides explicit when-not-to-use scenarios and alternative tools: 'Do NOT use to find usages/call sites — use find_references. Do NOT use for free-text search — use search_code.' It also informs agents that 'did you mean' suggestions are returned when no match is found, setting expectations for nil results. No missing context for usage decisions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
find_testsA
Map a symbol to the tests that exercise it — or a test file to the symbols it exercises.
If 'target' is a test file path, returns the modules/symbols it pulls in.
Otherwise treats it as a symbol name and returns the test files + test_*
functions that reference it. Use before changing code to know what to run.
| Name | Required | Description | Default |
|---|---|---|---|
| target | Yes | A symbol name (-> tests covering it) OR a test file path (-> what it exercises). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It explains the bidirectional behavior based on input type, which is transparent. No destructive or performance implications are mentioned, but for a query tool this is adequate.
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?
Two sentences with clear structure: first defines purpose, second adds usage context. No redundant words. Highly front-loaded and efficient.
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 one parameter and an output schema (not shown but indicated as present), the description covers usage and behavior sufficiently. It lacks details on error conditions but is complete for a simple mapping tool.
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?
The input schema has 100% coverage with a description for 'target'. The tool's description adds value by detailing the output based on target type (e.g., 'test_* functions', 'modules/symbols'), going beyond the schema's brief note.
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 uses a specific verb 'map' and clearly distinguishes two modes: symbol to tests and test file to symbols. It is not a tautology and effectively communicates the core function.
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 description provides explicit context: 'Use before changing code to know what to run.' This tells when to use it. It does not explicitly mention when not to use or alternatives, but the sibling tools list implies differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_dependenciesA
Show what a file imports (internal vs external) and which files import IT (reverse dependencies / blast radius).
Use to gauge the impact of changing a module. Returns import edges with line numbers and the list of dependent files.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Repo-relative .py file path. | |
| response_format | No | 'concise' or 'detailed'. | concise |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries the full burden. It discloses that it returns import edges with line numbers and a list of dependent files, and implies a read-only operation. Does not mention rate limits or permissions, but adds value beyond what's given.
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?
Extremely concise: two short sentences. The first sentence states the purpose, the second adds usage context and output. Every sentence is essential and front-loaded.
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?
Has output schema externally, but description explains output contents adequately (import edges, line numbers, dependent files). Covers both forward and reverse dependencies. Missing edge cases or error handling, but sufficient for common use.
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 description adds little new information about parameters beyond the schema. The path description is identical to schema; response_format is not mentioned in description. Baseline 3 is appropriate as schema does the heavy lifting.
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 clearly states it shows imports (internal vs external) and reverse dependencies (who imports it), using specific verbs and resource. It distinguishes itself from sibling tools like find_references and trace_call_graph by focusing on import dependencies and blast radius.
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?
Explicitly says 'Use to gauge the impact of changing a module', providing clear context. However, it does not explicitly mention when not to use or compare to alternatives like trace_call_graph, leaving some room for ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_file_outlineA
List the symbol skeleton of a file or directory WITHOUT reading bodies — the cheapest way to understand what a file contains.
Returns a nested outline (classes, methods, functions, module vars) with line numbers. Prefer this over reading a whole file when you only need its shape.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Repo-relative path to a .py file, or a directory (e.g. 'pkg/' ). | |
| response_format | No | 'concise' (names) or 'detailed' (signatures + docstrings). | concise |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses that the operation is cheap (cost hint), does not read bodies, and returns a nested outline with line numbers. Could add limits (e.g., only for Python files based on path schema) but is fairly transparent.
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?
Two concise sentences front-load the purpose, with no fluff. The second sentence adds important detail about return content. Every phrase earns its place.
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?
The description covers what, why, and when to use the tool. Given the simple read-only nature with 2 well-documented parameters and an output schema, it is largely complete. Could mention that it works only for Python files (based on path schema) but otherwise sufficient.
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% with clear parameter descriptions. The description does not add extra semantics beyond what the schema provides, but it reinforces the return context ('outline with line numbers'). Baseline score of 3 is appropriate.
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?
Clearly states the action ('List the symbol skeleton') and resource ('a file or directory'), with the key benefit of NOT reading bodies. Distinguishes itself from reading a whole file, which is a sibling operation.
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?
Explicitly advises to prefer this over reading a whole file when only the shape is needed. Implicitly contrasts with tools like search_code or find_references, but does not enumerate when to avoid it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_type_hierarchyA
Show a class's type hierarchy: superclasses upward and subclasses / Protocol-ABC implementations downward.
Returns two indented trees with 'path:line'. External bases (e.g. pydantic
BaseModel) appear as leaves marked external/unresolved.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Class name (bare or dotted). | |
| depth | No | Max levels up and down (1-8). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Description discloses return format (two indented trees with 'path:line') and edge cases (external bases marked external/unresolved). This adds behavioral context beyond the schema or annotations, which are absent.
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?
Description is concise (two sentences) and front-loaded with purpose. No unnecessary words.
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 an output schema present, the description adequately explains return values. It could mention error handling or prerequisites, but the core functionality is well-covered.
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 parameters are already described. The description does not add extra meaning beyond the schema, so baseline of 3 is appropriate.
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?
Description clearly states the tool shows a class's type hierarchy, specifying both superclasses and subclasses/implementations. It distinguishes from sibling tools like find_symbol or trace_call_graph by focusing on type hierarchy specifically.
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?
No explicit guidance on when to use this tool versus alternatives. The purpose is clear, but there's no 'when-to-use' or 'when-not-to-use' information, leaving the agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
repo_overviewA
Summarize the entire repository in one call — run this FIRST on an unfamiliar codebase.
Returns: project name, file/LOC/symbol counts, detected package manager,
config files, entry points, test setup, notable frameworks, and a per-top-level
-package size map (files/LOC/classes/functions).
Do NOT use for finding a specific symbol or file — use find_symbol or
get_file_outline for that.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It lists the returned data in detail: project name, counts, package manager, config files, entry points, test setup, frameworks, and per-package size map. It implies a read-only, one-call operation. Could mention potential computational cost, but overall transparent.
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?
Concise and well-structured: front-loaded with the key instruction 'run this FIRST', then a clear bullet list of return values. Every sentence is necessary and no waste.
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?
Given the tool's purpose (summarizing entire repo) and the presence of an output schema, the description fully covers usage context, return values, and exclusions. Nothing critical is 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?
The tool has zero parameters, so baseline is 4. The description adds no parameter info beyond what schema already provides (nothing to add), which is appropriate.
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 clearly states the tool's purpose: 'Summarize the entire repository in one call — run this FIRST on an unfamiliar codebase.' It specifies the action (summarize) and resource (repository), and distinguishes from siblings by advising against using for specific symbols/files.
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?
Explicitly says when to use: 'run this FIRST on an unfamiliar codebase.' Provides clear when-not guidance: 'Do NOT use for finding a specific symbol or file — use find_symbol or get_file_outline for that.' This directly addresses alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_codeA
Search the repo, filtered and paginated. mode='lexical' does exact/regex text matching; mode='semantic' ranks symbols by natural-language meaning ("where is auth handled?").
Returns file:line plus the matching line (lexical) or matched symbol (semantic).
Use this when you do NOT know the exact symbol name. Prefer find_symbol /
find_references when you DO — they are structural and far more precise.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Text or regex to search for. | |
| mode | No | 'lexical' (default, exact/regex) or 'semantic' (natural-language meaning; requires the optional 'semantic' extra). | lexical |
| regex | No | Treat query as a regular expression. | |
| path_glob | No | Restrict to paths matching a glob, e.g. '*/api/*.py'. | |
| case_sensitive | No | Case-sensitive match. | |
| limit | No | Max hits to return. | |
| offset | No | Pagination offset. |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Describes return format (file:line plus matched text/symbol) and pagination. With no annotations, it provides good transparency but misses clarifying interactions between regex and modes, and doesn't mention auth/rate limits, though these are not critical 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?
Four sentences, front-loads primary purpose, then explains modes, results, and usage guidance. No redundancy or fluff.
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 output schema present, the description adequately covers key behaviors (mode difference, pagination, usage guidance) without needing to detail every parameter. It is complete for an agent to select and invoke 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 covers all 7 parameters. Description adds value by explaining lexical vs semantic mode behavior and result differences, going beyond what the schema provides. A solid improvement over baseline 3.
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?
Clearly states it searches the repo with filtering and pagination, and distinguishes two modes. It also contrasts with siblings by noting when to use structural tools instead.
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?
Explicitly tells when to use this tool (when exact symbol name unknown) and when not to (prefer find_symbol/find_references). Also notes semantic mode requires optional extra.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
trace_call_graphA
Trace the call graph from a function — callers or callees — to N levels, in one call (instead of chaining find_references by hand).
Returns an indented tree of qualified names with 'path:line'. Recursion and the
depth limit are marked inline. Shares the name-resolution precision tradeoff of
find_references.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Function/method to start from. | |
| direction | No | 'callees' (what it calls) or 'callers' (what calls it). | callees |
| depth | No | How many levels to expand (1-4 recommended). |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full burden. It describes the output format (indented tree with path:line), mentions recursion depth limit marking, and shares precision tradeoff. It could explicitly state it's read-only, but the given details provide good transparency.
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?
Two concise sentences that front-load the core action and benefit, then add output format and tradeoff. No wasted words.
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?
Given the tool's complexity (3 params, output schema present), the description covers purpose, output, and a key tradeoff. It could mention error handling or performance, but overall it provides sufficient context.
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 baseline is 3. The description adds context like 'callers or callees' and 'N levels' that map to parameters, but does not provide additional details beyond the schema's descriptions.
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 clearly states the tool's purpose: 'Trace the call graph from a function — callers or callees — to N levels'. It distinguishes itself from the sibling tool 'find_references' by noting it does this in one call instead of chaining.
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 description provides context by contrasting with chaining find_references and mentions a precision tradeoff. However, it does not explicitly state when not to use this tool or provide alternative conditions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct aspect of code analysis (e.g., symbol definition vs. references vs. call graph), with no overlap in purpose. Descriptions clearly differentiate them.
Most tools follow a verb_noun pattern (find_symbol, search_code, get_file_outline, trace_call_graph), with a few exceptions like repo_overview and code_history that are still clear and not confusing.
10 tools is well-scoped for a code reference server, covering all major analysis needs without bloat. Each tool serves a clear, non-redundant purpose.
The tool surface is comprehensive, covering repo overview, file outline, symbol definition, references, call graph, dependencies, tests, type hierarchy, search, and git history. No obvious gaps for understanding a codebase.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that transforms codebases into intelligent, queryable knowledge bases, enabling AI assistants to perform semantic search, explore architecture, and analyze code relationships.166
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents structured code understanding and precise code intelligence via local indexing of AST, call graphs, and semantic search.764Apache 2.0
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to navigate and understand codebases through file descriptions, semantic search, and code recommendations without repeatedly scanning files.MIT
- AlicenseNot gradedqualityCmaintenanceAn MCP server that gives AI coding agents structured access to a project's architecture, rules, modules, and technical decisions.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mark-burg/reference-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server