Skip to main content
Glama
token-context-mcp

token-context-mcp

by MCK564

Token Context MCP

token-context-mcp 是一个只读的本地 MCP 服务器,它索引已注册的仓库,并返回小的、带源哈希的代码上下文包。它旨在减少广泛的仓库爬取,而不假装语法分析是完整的语义模型。

0.1.0 中实现的功能

  • 显式仓库注册;MCP 工具接收 repo_id,绝不接收任意路径;

  • 对 Python、JavaScript 和 TypeScript/TSX 进行 Tree-sitter 解析;

  • SQLite 快照,包含文件、符号、词法边、清单和源哈希;

  • 令牌预算的仓库地图、源支持的骨架、符号上下文和有界影响切片;

  • 通过 MCP stdio 提供严格的只读工具表面;

  • 对机密/元数据的硬性拒绝规则、路径遍历/重解析点检查和资源限制;

  • 安全、集成和基准测试工具,报告证据而不是声称普遍节省。

Related MCP server: io.github.pmgarg/cgraphy

非目标和安全边界

此服务器不编辑文件、不执行 shell 命令、不监听 HTTP、不调用网络 API,也不接受任意仓库路径。stdio 不是操作系统沙箱:如果需要强制网络边界,请使用无出口/最小权限策略进行部署。工具结果仍可能被放入 MCP 主机的 LLM 上下文中。

快速开始

uv sync --extra dev
uv run token-context register --repo-id demo --root D:\AI\some-repo
uv run token-context index --repo-id demo
uv run token-context status --repo-id demo
uv run token-context serve

默认情况下,注册表对于当前 Windows 用户是全局的,位于 %APPDATA%\token-context-mcp\repos.toml;它与当前工作目录无关。设置 TOKEN_CONTEXT_CONFIG 以使用显式的共享/便携式 TOML 路径。对于 Codex,通过配置的 stdio MCP 命令启动包。仅使用服务器列出的只读工具。

安全地注册仓库

注册是一个显式的本地允许列表决策,不是上传、Git 操作或源代码更改。--repo-id 是 MCP 请求中使用的稳定标识符;--root 是服务器允许读取的唯一规范仓库目录。

Set-Location D:\AI\token-context-mcp
uv run token-context register --repo-id video-lecturer --root D:\AI\video_lecturer
uv run token-context index --repo-id video-lecturer
uv run token-context status --repo-id video-lecturer

使用特定的项目根目录,切勿使用宽泛的父目录,例如 D:\AI。在相关更改后重新运行 index;它会重用未更改的解析结果。现有注册和索引数据库由同一 Windows 用户下启动的每个 MCP 进程共享。

要为单个终端或便携式部署使用不同的注册表位置,请在注册、索引和启动 MCP 服务器之前设置它:

$env:TOKEN_CONTEXT_CONFIG = 'D:\trusted-shared-config\repos.toml'
uv run token-context register --repo-id myrepo --root D:\projects\myrepo
uv run token-context index --repo-id myrepo

从编码代理使用

这是一个本地 MCP stdio 服务器。它适用于可以启动本地进程且其 PATH 中有 uv 的客户端。在同一 Windows 用户下启动的每个客户端进程都会自动读取相同的全局仓库注册表。更改注册表或其策略后,请重启客户端。

客户端

本地 stdio 支持

设置状态

Codex CLI / IDE

是

已安装并在此机器上进行了端到端测试。

Claude Code

是

支持;在用户或项目范围内添加。

GitHub Copilot CLI

是

通过 CLI 用户配置或项目配置支持。

GitHub Copilot Chat in VS Code

是

通过 .vscode/mcp.json 或 MCP UI 支持。

Google Antigravity IDE / CLI

是

通过全局或工作区 mcp_config.json 支持。

Claude Desktop

有条件

它通过桌面扩展支持本地 MCP,但此项目尚未发布 .dxt 包。

云/Web 代理无法在此 Windows 机器上启动此服务器。它们需要单独部署的、经过身份验证的 HTTP MCP 服务;此项目有意仅提供本地 stdio 传输。

Codex

有两种方法可以将 Codex 连接到 token-context-mcp:

方法 A:通过 Codex CLI

codex mcp add token-context -- uv run --directory D:\AI\token-context-mcp token-context serve --transport stdio
codex mcp get token-context

方法 B:直接配置文件(~/.codex/config.toml)

如果 codex 命令在您的 PowerShell PATH 中不可用,请直接将服务器添加到 %USERPROFILE%\.codex\config.toml:

[mcp_servers.token-context]
command = "uv"
args = ["run", "--directory", "D:\\AI\\token-context-mcp", "token-context", "serve", "--transport", "stdio"]

GUI 提示: 如果 Codex 找不到 uv,请将 "uv" 替换为绝对路径:"C:\\Users\\<YourUser>\\AppData\\Roaming\\Python\\Python312\\Scripts\\uv.exe"。


Claude(Claude Code 和 Claude Desktop)

1. Claude Code(CLI)

claude mcp add --transport stdio --scope user token-context -- uv run --directory D:\AI\token-context-mcp token-context serve --transport stdio
claude mcp get token-context

2. Claude Desktop(Windows 应用)

打开或创建 %APPDATA%\Claude\claude_desktop_config.json(例如 C:\Users\<YourUser>\AppData\Roaming\Claude\claude_desktop_config.json)并添加:

{
  "mcpServers": {
    "token-context": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "D:\\AI\\token-context-mcp",
        "token-context",
        "serve",
        "--transport",
        "stdio"
      ]
    }
  }
}

注册和使用 task2-demo

1. 注册和索引仓库

在 PowerShell 中运行这些命令(在 %APPDATA%\token-context-mcp\repos.toml 中全局注册):

# Register repository
uv run --directory D:\AI\token-context-mcp token-context register --repo-id task2-demo --root D:\AI\video_lecturer\task\task2_demo

# Build index
uv run --directory D:\AI\token-context-mcp token-context index --repo-id task2-demo

# Check status
uv run --directory D:\AI\token-context-mcp token-context status --repo-id task2-demo

2. 用于 Codex / Claude / Antigravity 的示例提示

重启 Codex、Claude 或 Antigravity 后,在聊天中发送此提示:

Use token-context for repo_id "task2-demo".
Start with get_repo_map at 512 tokens to inspect the project structure,
then use get_file_skeleton for "src/lecturer_demo/cli.py".

如果客户端无法启动服务器,请先在 PowerShell 中运行 uv run --directory D:\AI\token-context-mcp token-context serve --transport stdio 以检查其 Python 环境。GUI 客户端有时不会继承终端的 PATH;在这种情况下,将 command 设置为 uv.exe 的绝对路径,然后重启客户端。

官方客户端设置参考:OpenAI Codex、Claude Code、GitHub Copilot CLI、GitHub Copilot in IDEs、Antigravity 和 Claude Desktop。

令牌和资源限制

全局注册表具有可执行的 [server] 策略。编辑 TOML 并重启 Codex 以应用更改:

[server]
max_request_bytes = 65536
max_result_tokens = 2048
max_graph_nodes = 75
max_symbol_results = 15
network_policy = "declared-deny-not-enforced"
  • max_result_tokens 限制地图、骨架和符号上下文的输出。这是模型上下文消耗的主要控制。

  • max_graph_nodes 限制影响切片遍历。

  • max_symbol_results 限制搜索结果。

  • max_request_bytes 拒绝过大的 MCP 输入。

较低的值会减少令牌,但会导致更多的截断和后续调用。服务器仅限制其返回的上下文;它不能为整个 Codex/模型会话施加硬性提供商计费限制。

命令

  • register:将规范的、非链接的仓库根目录添加到本地 TOML 注册表。

  • index:构建原子 SQLite 快照和 JSON 清单。

  • status:检查存储的快照并检测索引后更改的文件。

  • serve:启动 MCP stdio 服务器。

  • benchmark-report:从带插桩的 JSONL 运行日志计算汇总统计信息。

  • release-materials:生成 SBOM/来源起始工件;签名和操作系统沙箱证据仍是部署责任。

工具契约

  • get_repo_map

  • find_symbols

  • get_file_skeleton

  • get_symbol_context

  • get_impact_slice

  • get_index_status

每个结果都是一个 JSON 信封,包含 index_run_id、freshness、预算、警告和源证据。词法边被明确标记为 ambiguous;未解析的边并不证明不存在关系。

开发

uv run pytest
uv run token-context release-materials --output supply-chain

有关威胁模型、集成说明和基准协议,请参阅 SECURITY.md 和 docs/。

Available Tools

10 tools
find_symbolsFind symbolsC

Find source-backed symbols by name or qualified-name pattern. Returns IDs and spans, never arbitrary files.

NameRequiredDescriptionDefault
kindNo
limitNo
patternYes
profileNo
repo_idYes
max_tokensNo

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, but it does add real behavioral context: results are "source-backed" and return "IDs and spans, never arbitrary files," which tells the agent the result shape and constraints. It omits read-only nature, pagination, and any failure/empty-result behavior for a 6-param tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two tight sentences, front-loaded with the core action and followed by the return-value constraint. No wasted words, though the extreme brevity is part of why parameter detail is missing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with no annotations, no output schema, and 0% schema description coverage, the definition is under-specified. It states return contents but leaves parameter meaning and usage boundaries to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate — but it only hints at the pattern parameter. kind, profile, limit, max_tokens, and repo_id are undocumented anywhere, leaving half the parameter surface opaque (e.g., what kind values are valid, what profile selects).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Find source-backed symbols by name or qualified-name pattern" gives a specific verb (find) and resource (symbols) plus the lookup key. It clearly distinguishes a symbol search from file-level siblings like search_source, though it never names an alternative explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when the tool is useful (name/qualified-name lookup) but offers no explicit when-to-use, when-not-to-use, or routing guidance among the many symbol-related siblings (inspect_symbol, get_symbol_context, search_source). An agent must infer the boundary itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_file_skeletonFile skeletonC

Imports and source-backed headers from one file. Function bodies elided by default.

NameRequiredDescriptionDefault
pathYes
profileNo
repo_idYes
max_tokensNo
include_privateNo

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It usefully discloses that function bodies are elided by default, which is a meaningful behavioral trait, but says nothing about permissions, whether the operation is read-only, truncation behavior from max_tokens, or what the profile parameter alters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no filler, and the core output (imports and headers) is front-loaded. The phrasing 'Imports and source-backed headers' is slightly awkward but compact.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no annotations, no output schema, and 0% schema description coverage, this description is far too thin. It omits parameter meanings, privacy behavior, truncation behavior, and any sense of output shape beyond the elision default.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 5 parameters, so the description must compensate but largely does not. 'One file' weakly implies path/repo_id, and 'by default' weakly hints at profile or include_private configurability, but max_tokens, include_private, and the profile semantics remain entirely undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the specific resource (one file) and what is returned (imports and source-backed headers), and distinguishes the resource from siblings like search_source or inspect_symbol by naming the skeleton concept. It is clear but does not explicitly differentiate itself from the sibling set.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives such as inspect_symbol, get_symbol_context, or search_source. The agent must infer that a file skeleton is preferred over symbol-level or source-text tools, which is not stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_impact_sliceImpact candidate sliceC

Traverse observed caller/callee edges from a symbol. Candidate impact slice, not complete blast radius.

NameRequiredDescriptionDefault
depthNo
profileNo
repo_idYes
directionNoboth
max_nodesNo
symbol_idYes
max_tokensNo
min_confidenceNo
filter_ambiguousNo

TDQS

C2.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral burden. It usefully discloses that edges are 'observed' and the result is a 'candidate impact slice, not complete blast radius,' but omits permissions, return behavior, and limits for its 9 parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short, front-loaded sentences with no wasted words. The scope caveat is placed immediately after the core action, making the description easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters, no output schema, and no annotations, the description is too thin. It gives the core purpose and a scope caveat but leaves parameter behavior and invocation guidance almost entirely undocumented.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for 9 parameters, and the description adds no meaning beyond 'from a symbol' and 'caller/callee edges.' It does not explain depth, profile, max_nodes, max_tokens, min_confidence, or filter_ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action: traverse observed caller/callee edges from a symbol. The added caveat 'Candidate impact slice, not complete blast radius' clarifies scope, though it does not name sibling alternatives like get_module_dependents.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use guidance or alternatives are provided. The caveat 'not complete blast radius' hints at a limitation but does not route the agent to another tool or condition.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_index_statusIndex statusB

Active snapshot metadata and paths changed since indexing. Run before relying on graph results.

NameRequiredDescriptionDefault
repo_idYes

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It discloses the timing guidance and that it reports index freshness/changed paths, but it does not explicitly state read-only safety, side effects, permissions, or freshness semantics, leaving behavioral traits partly implicit.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with no filler and usage guidance front-loaded after the return summary. The first sentence is a fragment, but the description avoids bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations, no output schema, and no parameter descriptions, the description is under-informative: it covers return content at a high level but omits repo_id semantics and safety/profile details. It is not complete enough for an agent to call without additional assumptions.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must define repo_id, but it never mentions the parameter. The single required parameter's meaning, format, and scope are left to inference from its name alone.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description supplies the data returned (active snapshot metadata, changed paths since indexing) but never uses a clear verb and does not differentiate this status check from the graph-query siblings. An agent can infer it is a read, but the purpose is not stated as explicitly as a 'returns X' statement would be.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear trigger: run before relying on graph results. No when-not condition or alternative tool is named, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_module_dependentsModule dependentsC

Lexical import relationships for indexed path or module. Dynamic imports flagged. Not semantic resolution.

NameRequiredDescriptionDefault
pathNo
moduleNo
profileNo
repo_idYes
max_tokensNo

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does disclose meaningful caveats: results are lexical rather than semantic, and dynamic imports are flagged separately. However, it never clarifies directionality (do dependents mean files that import this module, or its imports?), nor result format, limits, or indexing requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short fragments, front-loaded with the core purpose and the caveat, with no filler. It is telegraphic to the point of strain but every clause carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter tool with no schema descriptions, no annotations, and no output schema, the description leaves too much unaddressed: required repo_id, profile, max_tokens, and the direction of the relationship. An agent could not invoke this reliably without guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 5 parameters and the description only addresses two of them (path, module). repo_id is required yet unexplained, and profile and max_tokens are never mentioned, so the description does not compensate for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource (lexical import relationships) and scopes it to an indexed path or module, which is enough to tell it apart from siblings like get_repo_map or find_symbols. The verb is implicit ('get' in the name), but the returned concept is clearly identified.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no prerequisites, and no reference to sibling alternatives such as get_impact_slice or get_symbol_context. The phrase 'for indexed path or module' hints at applicability but does not guide tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_repo_mapRepository mapB

Ranked definitions for a repo_id within budget. Compact entries are [id, path:line, kind/name]; format='full' adds signatures and evidence. For orientation, not proof of full coverage.

NameRequiredDescriptionDefault
queryNo
formatNo
profileNo
repo_idYes
budget_tokensNo
include_testsNo
include_omitted_idsNo

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries the full burden. It usefully discloses the entry format, the budget constraint ('within budget'), and a coverage caveat, but says nothing about auth, performance, or how budget truncation interacts with include_omitted_ids.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences, front-loaded with the core purpose and output contract, with the caveat last. No filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with no annotations and no output schema, leaving four parameters unexplained and omitting any routing guidance to the many sibling discovery tools is a substantial gap, even though the format and coverage caveat are handled well.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% with 7 parameters. Only format='full' vs compact is explained and budget_tokens is hinted at via 'within budget'. query, profile, include_tests, and include_omitted_ids are entirely undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a concrete verb+resource ('Ranked definitions for a repo_id') and the two output shapes, which distinguishes it from siblings like get_file_skeleton and get_symbol_context. It does not explicitly name the sibling it complements, so it stops 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.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'For orientation, not proof of full coverage' implies when the tool is appropriate, but there is no explicit when-to-use versus alternatives such as get_file_skeleton or inspect_symbol. Usage is suggested rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_symbol_contextSymbol contextC

Bounded source packet for indexed symbol and observed edges. Check freshness and ambiguity warnings. A body larger than max_tokens is read in windows with body_offset_line.

NameRequiredDescriptionDefault
depthNo
profileNo
repo_idYes
symbol_idYes
max_tokensNo
include_bodyNo
body_offset_lineNo
include_omitted_idsNo

TDQS

C2.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It usefully discloses that the result is bounded and that large bodies are read in windows via max_tokens and body_offset_line, but it omits permissions, error behavior, and freshness/ambiguity warning semantics.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short and front-loads the core purpose, then adds two relevant behavioral notes. It avoids repetition, though the wording is terse enough that some important details feel compressed rather than clarified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter tool with no annotations, no output schema, and 0% schema description coverage, the description is materially incomplete. It covers the surface purpose and windowing behavior but leaves most parameters, return structure, and alternative-tool selection unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are 8 parameters, so the description must compensate. It explains only max_tokens and body_offset_line indirectly; depth, profile, include_body, include_omitted_ids, repo_id, and symbol_id remain undocumented beyond their titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description identifies a specific resource: a bounded source packet for an indexed symbol plus observed edges. It communicates what the tool returns, but it does not distinguish the tool from siblings such as inspect_symbol or get_file_skeleton, so an agent must infer the boundary.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives output-related advice ('Check freshness and ambiguity warnings') but does not state when to choose this tool over alternatives like inspect_symbol or find_symbols. No prerequisites, exclusions, or selection criteria are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

inspect_symbolInspect symbol (composite)C

Resolve a symbol and its immediate graph in one call. view='full' returns a context packet: body, callee/caller signatures, related tests. Use before editing a symbol.

NameRequiredDescriptionDefault
viewNonormal
queryYes
repo_idYes
budget_tokensNo

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It doesn't state whether this is read-only, whether there are rate limits or caching behavior, what 'immediate graph' means in practice, or how the view modes affect behavior. The token budget implication is only hinted at.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three tight sentences, front-loaded with purpose. No wasted words, though the 'view=full' detail would be better placed after establishing the baseline behavior.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-param composite tool with no annotations and no output schema, the description is thin. It doesn't explain the return packet shape beyond a partial list, doesn't document the budget_tokens interaction, and leaves view semantics mostly opaque.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate for undocumented params. It mentions view='full' but doesn't explain what 'minimal' or 'normal' return, doesn't clarify the required 'query' semantics (symbol name? pattern?), and never mentions repo_id or budget_tokens.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Resolve a symbol and its immediate graph in one call.' Clear on what the tool does, though it doesn't distinguish itself from sibling get_symbol_context, which likely overlaps significantly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Says 'Use before editing a symbol,' which implies a workflow context. But it gives no explicit when-not-to-use guidance and doesn't differentiate from close siblings like get_symbol_context or find_symbols.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_repositoriesRegistered repositoriesA

List registered repository IDs. Call this first; roots are never exposed.

NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the burden. It adds one useful behavioral fact ('roots are never exposed'), which tells the agent something about result scoping. However it omits return volume, ordering, and whether an index must exist, leaving the safety/behavioral profile thin for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, purpose front-loaded, followed by the usage cue and the scoping note. Every clause earns its place with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A zero-param read tool with no output schema is largely self-describing; the description names what is returned (IDs) and a scope caveat. It could have mentioned whether an index must be built first, but nothing essential to invoking it is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so per the rubric the baseline is 4. There is nothing for the description to clarify beyond confirming it is a no-argument listing call.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('List registered repository IDs') and even specifies the return granularity (IDs, not full repo objects). It doesn't explicitly differentiate from siblings like get_repo_map or get_index_status, but the resource is distinct enough that confusion is unlikely.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Call this first' gives a clear ordering cue for the workflow, which is meaningful for a discovery tool. It does not name an alternative or a when-not condition, so it falls short of a full 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_sourceSearch sourceB

Full-text search ranked by enclosing symbol. expand='graph' (default for profile 'locate') adds resolved callers/callees as neighbors. Call before reading files.

NameRequiredDescriptionDefault
limitNo
queryYes
expandNoauto
profileNo
repo_idYes
expand_kNo
max_tokensNo
expand_hopsNo
min_confidenceNo

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose two real behaviors: symbol-based ranking and graph expansion that adds resolved callers/callees as neighbors. It says nothing about permissions, cost/latency, ranking fallback, or what happens with the non-enum parameters, so transparency is partial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the core purpose, then the expand behavior, then a usage cue. No padding, though the parameter detail sentence is dense and cryptic without surrounding context.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

A 9-parameter tool with no annotations, no output schema, and 0% schema description coverage needs considerably more from the description. It explains only one parameter interaction and omits the meaning, defaults, and effects of most arguments, leaving an agent under-equipped to invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and there are 9 parameters, so the description must compensate. It only clarifies expand='graph' and its interaction with profile 'locate', leaving limit, max_tokens, expand_k, expand_hops, and min_confidence completely undocumented in both schema and description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ("Full-text search") and adds a distinguishing behavioral detail: results are ranked by enclosing symbol. It does not, however, differentiate itself from siblings like find_symbols or inspect_symbol, so an agent cannot tell from the text alone which search tool to pick.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Call before reading files" gives an implied usage context, suggesting this is a discovery/entry-point tool. But there is no when-not guidance and no explicit routing to alternatives such as find_symbols for symbol lookups, so the guidance stays at implication level.

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.

  1. 1 tool updatev0.3.3
    • Changedget_symbol_context1 field changed
      • addedInput schema / properties / body_offset_line
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "integer"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Body Offset Line"
        +}
  2. 3 tool updatesv0.2.0
    • Changedget_impact_slice2 fields changed
      • addedInput schema / properties / filter_ambiguous
        Added value: +{
        +  "default": true,
        +  "title": "Filter Ambiguous",
        +  "type": "boolean"
        +}
      • addedInput schema / properties / min_confidence
        Added value: +{
        +  "anyOf": [
        +    {
        +      "type": "number"
        +    },
        +    {
        +      "type": "null"
        +    }
        +  ],
        +  "default": null,
        +  "title": "Min Confidence"
        +}
    • Addedinspect_symbol
    • Changedsearch_source4 fields changed
      • addedInput schema / properties / expand
        Added value: +{
        +  "default": "auto",
        +  "enum": [
        +    "auto",
        +    "none",
        +    "graph"
        +  ],
        +  "title": "Expand",
        +  "type": "string"
        +}
      • addedInput schema / properties / expand_hops
        Added value: +{
        +  "default": 1,
        +  "title": "Expand Hops",
        +  "type": "integer"
        +}
      • addedInput schema / properties / expand_k
        Added value: +{
        +  "default": 3,
        +  "title": "Expand K",
        +  "type": "integer"
        +}
      • addedInput schema / properties / min_confidence
        Added value: +{
        +  "default": 0.6,
        +  "title": "Min Confidence",
        +  "type": "number"
        +}
  3. 9 tool updatesv0.1.0
    • First observedfind_symbols
    • First observedget_file_skeleton
    • First observedget_impact_slice
    • First observedget_index_status
    • First observedget_module_dependents
    • First observedget_repo_map
    • First observedget_symbol_context
    • First observedlist_repositories
    • First observedsearch_source

TDQS

B3.3/5.0

Scored across 10 tools

Disambiguation3/5

Most tools target distinct phases (list repos, index status, search, orient, read context, traverse graph), but boundaries blur in places: get_symbol_context and inspect_symbol both return source packets plus edges for a symbol, and get_impact_slice, get_module_dependents, and search_source(expand='graph') all traverse relationships. Descriptions attempt to differentiate via 'one call', 'lexical vs semantic', and 'candidate vs complete', but an agent could still misselect among them.

Naming Consistency5/5

Every tool follows a consistent verb_noun snake_case pattern (get_*, find_*, list_*, search_*, inspect_*). Prefixes map cleanly to intent: get for retrieval, find/list/search for discovery. No mixed conventions.

Tool Count5/5

Ten tools is well-scoped for a code-context/index server. Each tool earns its place across discovery, search, orientation, symbol reading, and graph traversal, with no redundant filler.

Completeness4/5

Coverage spans repository listing, index freshness, symbol search, orientation maps, file skeletons, bounded source context, and impact traversal — a solid read-only surface with no obvious dead ends. Minor gaps like direct line-range/file-read or cross-repo comparison are workable around via existing tools.

Maintenance

ActivityActive
ResponsivenessSyncing

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    Local, read-only MCP server for coding agents. Indexes repeated implementations in your repository (FastAPI routes, pytest fixtures, Pydantic and SQLAlchemy models) and returns source-backed examples with a bounded read plan, or a typed UNKNOWN when evidence is insufficient. No LLM or network calls.
    1
    3 npm
    MIT
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI coding agents to retrieve token-budgeted project context, search code symbols, look up definitions, and access project memory and cross-project learnings through local MCP tools. It reduces redundant exploration by supplying the smallest useful context from a deterministic, local-first index.
    MIT