Skip to main content
Glama
MCK564

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: repogrammar_context

非目标和安全边界

此服务器不编辑文件、不执行 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 CodexClaude CodeGitHub Copilot CLIGitHub Copilot in IDEsAntigravityClaude 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_idfreshness、预算、警告和源证据。词法边被明确标记为 ambiguous;未解析的边并不证明不存在关系。

开发

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

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

Available Tools

9 tools
find_symbolsFind symbolsC

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

ParametersJSON Schema
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 provided, the description carries the full burden. It discloses useful behavioral details: it returns 'IDs and spans' and restricts results to source-backed symbols, never arbitrary files. However, it does not address pagination, limit behavior, pattern semantics, or side effects, leaving meaningful gaps.

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 only two sentences with no filler, and the core scoping is front-loaded. It earns points for efficiency, though the brevity comes at the expense of deeper guidance.

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 six parameters, no annotations, no output schema, and a list of close sibling tools, the description is too sparse. It omits parameter semantics, usage guidance, and return-format details beyond 'IDs and spans,' making it barely adequate for reliable tool selection and invocation.

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 clarifies the pattern parameter as a name or qualified-name fragment. The other five parameters, including kind, limit, profile, and max_tokens, are left entirely undocumented, and no information is given about valid kind values or how limit behaves.

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 a specific verb ('Find'), a clear resource ('source-backed symbols'), and the matching criterion ('by name or qualified-name fragment'). It also adds a scoping contrast ('never arbitrary files'), which helps separate it from file-level search, though it does not explicitly name a sibling alternative.

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 guidance on when to use this tool versus alternatives such as search_source or get_symbol_context. The phrase 'source-backed symbols' implies symbol lookup rather than text search, but the agent is left to infer the appropriate context.

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

get_file_skeletonFile skeletonA

Return imports and source-backed headers from one indexed repository-relative file. Function bodies are elided by default.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
profileNo
repo_idYes
max_tokensNo
include_privateNo

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description must carry behavioral disclosure itself. It does disclose one important behavior—function bodies are elided by default—and notes the file must be indexed, but it does not mention side effects, accessibility requirements, or behavior for missing/unindexed files.

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 succinct sentences; the main capability is front-loaded and the elision default is added as a precise second sentence. No filler or redundant restatement of the tool name.

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 five parameters, no output schema, and no annotations, the description is too thin. It leaves 'source-backed headers' undefined, omits return-shape details, and does not clarify how max_tokens/profile/include_private affect results.

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 needed to compensate, but it only loosely clarifies that the path is repository-relative and indexed. The optional parameters profile, max_tokens, and include_private are not explained anywhere, leaving their semantics to inference from names alone.

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

Purpose5/5

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

The description names a specific verb ('Return') and resource ('imports and source-backed headers from one indexed repository-relative file'), making the tool's scope clear. It also distinguishes itself from sibling tools like get_repo_map or find_symbols by emphasizing a single-file skeleton rather than repo-wide mapping or symbol search.

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?

The intended use is implied: use when you need a file's imports and headers rather than full bodies. However, it does not state when to prefer this over siblings such as get_symbol_context or get_impact_slice, and it gives no explicit exclusions or alternatives.

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 sliceB

Traverse observed caller/callee edges from a symbol. It is a candidate impact slice, never a proof of complete blast radius.

ParametersJSON Schema
NameRequiredDescriptionDefault
depthNo
profileNo
repo_idYes
directionNoboth
max_nodesNo
symbol_idYes
max_tokensNo

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It usefully discloses that edges are 'observed' and that the result is a candidate slice, not proof of full blast radius, which is valuable honesty about limitations. However, it does not mention whether the operation is read-only, what the output shape is, or how budget-related parameters affect behavior.

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?

The description is two short sentences with no filler. The core action is front-loaded, and the second sentence adds an important scoping caveat without repeating schema 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 tool with seven parameters, no annotations, and no output schema, this description is not complete enough for confident invocation. An agent would need to guess the meaning of most optional parameters and the expected return structure, so significant context is missing.

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 explains almost nothing about the parameters. It connects 'symbol' to the likely symbol_id usage, yet does not clarify direction, depth, max_nodes, max_tokens, or profile, all of which are non-obvious from names alone.

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

Purpose5/5

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

The description uses a specific verb ('traverse') and resource ('observed caller/callee edges from a symbol'), making the core function immediately clear. It distinguishes itself from siblings by framing the result as an impact slice rather than a proof or a generic symbol lookup.

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 explicit guidance about when to use this tool versus siblings like get_module_dependents or get_symbol_context. The caveat that it is 'never a proof of complete blast radius' implies a limitation, but it does not tell the agent when to prefer this tool or what alternative to use for stronger evidence.

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

get_index_statusIndex statusA

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

ParametersJSON Schema
NameRequiredDescriptionDefault
repo_idYes

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description itself must disclose behavior. It indicates a read-only operation ('Return') and implies salientness checking, but it doesn't describe error conditions or what 'active snapshot' means. This is adequate but not thorough.

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, no redundant wording, with the primary operation front-loaded. The usage guidance is separated into its own sentence, improving readability.

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

Completeness3/5

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

For a tool with no output schema, the description gives the gist of the return (snapshot metadata and changed paths) but not its structure or field details. It also doesn't elaborate on 'active snapshot,' so an agent may need to call the tool to learn the output shape. Given the single parameter and low complexity, this is a minor gap.

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?

The description never mentions the repo_id parameter, and with 0% schema description coverage, it adds no semantic value beyond the parameter name. The name is somewhat self-explanatory for an index-status tool, but the description still doesn't confirm its role.

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

Purpose5/5

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

The description uses the specific verb 'Return' and names the resource 'active snapshot metadata and paths changed since indexing,' which clearly differentiates it from sibling code-graph tools. The second sentence adds a functional context (run before graph results), reinforcing the purpose.

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 explicitly tells when to run the tool ('Run before relying on graph results'), giving agents a clear trigger condition. It doesn't name alternatives or state when not to use it, but the timing guidance is concrete.

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

get_module_dependentsModule dependentsB

Return Tree-sitter-extracted lexical import relationships for one indexed path or module. This is not semantic import resolution or lexical call-graph inference; dynamic imports are flagged rather than resolved.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathNo
moduleNo
profileNo
repo_idYes
max_tokensNo

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden and does provide meaningful behavior: Tree-sitter extraction, lexical scope, and dynamic-import flagging. It still omits output shape, whether the result is direct or transitive, and what 'indexed' implies operationally.

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 sentences, with the core operation front-loaded and the key limitation in the second sentence. No filler or repetition.

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?

No annotations, no output schema, and 0% parameter documentation leave significant gaps: return format, relationship to sibling impact/symbol tools, selection semantics when both path and module are provided, and error/indexing requirements. The description covers only the core behavior.

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 the description only clarifies that path or module selects a single indexed entity. It does not explain profile, max_tokens, or how repo_id is used, leaving most parameters underspecified.

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—'Return Tree-sitter-extracted lexical import relationships'—for a clear resource ('one indexed path or module') and distinguishes itself from semantic resolution and call-graph inference. It does not explicitly name a sibling tool, so differentiation is conceptual rather than direct.

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?

The description implies a read-only, lexical-use context and warns that dynamic imports are flagged rather than resolved, which suggests it is not for semantic dependency analysis. However, it never names sibling tools like get_impact_slice or gives explicit when-to-use/when-not-to-use criteria.

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

get_repo_mapRepository mapA

Return ranked definitions for a repo_id from list_repositories within a bounded context budget. Compact entries are [short_id, path:line, kind/name, optional rank marker]; request format='full' for signatures, per-symbol evidence, and detailed rank_basis. Use for orientation, not proof of full coverage.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryNo
formatNo
profileNo
repo_idYes
budget_tokensNo
include_testsNo
include_omitted_idsNo

TDQS

A4/5.0
Behavior4/5

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

No annotations are provided, so the description carries the behavioral-disclosure burden. It discloses a 'bounded context budget', describes the compact entry shape, and warns that results are not proof of full coverage. It does not mention permissions or error behavior, but for a read-oriented map tool the main behavioral caveat is clearly conveyed.

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 dense sentences front-load the primary purpose, then provide the output format, the format switch, and the key caveat. There is no filler, no restating of the title, and every clause adds functional value.

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

Completeness3/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 output schema and no annotations, the description is not fully complete: it leaves query and profile semantics undefined and does not enumerate all return fields. But it provides enough for a basic call with repo_id, explains the compact/full output difference, and gives a necessary truncation caveat, so it is minimally viable rather than severely deficient.

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?

With schema description coverage at 0%, the description must compensate for the bare parameter names. It does explain format values and indirectly hints at budget_tokens, and sources repo_id from list_repositories. However, query, profile, include_tests, and include_omitted_ids are not semantically described, leaving most of the 7 parameters underdocumented.

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

Purpose5/5

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

The opening verb 'Return' plus object 'ranked definitions' and scope 'for a repo_id from list_repositories' states exactly what the tool does and ties it to its prerequisite data source. The closing caveat 'Use for orientation, not proof of full coverage' helps distinguish this from deeper lookup siblings. It is specific and resource-scoped, not a tautology.

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?

'Use for orientation, not proof of full coverage' gives a clear context for when this tool is appropriate, and 'request format="full" for signatures, per-symbol evidence, and detailed rank_basis' tells the agent how to get more detail. It does not explicitly name sibling alternatives such as find_symbols or search_source, so it lacks the explicit exclusion needed for a 5.

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

get_symbol_contextSymbol contextB

Return a bounded source packet around one indexed symbol and observed graph edges. Use original source when body, freshness or ambiguity requires it.

ParametersJSON Schema
NameRequiredDescriptionDefault
depthNo
profileNo
repo_idYes
symbol_idYes
max_tokensNo
include_bodyNo
include_omitted_idsNo

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 transparency burden. It discloses that the result is bounded, that graph edges are 'observed', and that original source may be needed for body/freshness/ambiguity, signaling possible truncation or staleness. It does not mention side effects, authentication needs, or response structure.

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?

The description is two compact sentences with the primary action front-loaded and a short conditional instruction. There is no filler or redundancy, though the jargon could be clearer.

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 7 parameters, no annotations, and no output schema, two sentences are insufficient. It does not explain what a source packet contains, what graph edges are returned, how depth/max_tokens/profile affect results, or what include_body and include_omitted_ids control.

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% and the description adds no parameter-level guidance. The seven parameters—depth, profile, max_tokens, include_body, include_omitted_ids, repo_id, and symbol_id—are not explained beyond their self-explanatory names, and key behaviors like depth limits, token limits, and omitted IDs are left unspecified.

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 and resource: return a bounded source packet around one indexed symbol and observed graph edges. This is clearer than a tautology, though 'source packet' and 'observed graph edges' are jargon and it does not explicitly distinguish from graph-related siblings like get_impact_slice or get_repo_map.

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?

The second sentence provides a useful exclusion: use original source when body, freshness, or ambiguity matter, implying the returned context may be derived, stale, or incomplete. However, it does not say when to prefer this tool over alternatives like find_symbols or search_source, so the guidance is only partial.

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 only. Call this first; roots are never exposed.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations present, the description carries the full burden. It discloses an important behavioral trait: roots are never exposed. However, it does not explicitly state whether the operation is read-only, what the output format is beyond IDs, or whether any authorization is required.

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?

The description is two short sentences with no filler. The core purpose is front-loaded, and the usage hint follows immediately. Every word contributes to the agent's understanding.

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?

For a parameterless list tool with no output schema, the description communicates the essential behavior: return repository IDs and avoid exposing roots. The 'call this first' guidance completes the practical context, though the exact response shape is implied rather than explicit.

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?

This tool has zero parameters, so there is no parameter semantics to convey. The baseline for a zero-parameter tool is 4, and the description adds no contradictory or confusing parameter-related information.

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

Purpose5/5

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

The description uses a specific verb ('List') and resource ('registered repository IDs'), and the word 'only' sharpens the scope. This clearly distinguishes it from the sibling tools, which operate on repository contents rather than just enumerating IDs.

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?

The instruction 'Call this first' gives explicit sequencing guidance, and 'roots are never exposed' warns the agent about a limitation. It does not name sibling alternatives explicitly, but the first-step positioning plus the ID-only scope makes the usage context reasonably clear.

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

search_sourceSearch source bodiesA

Search indexed symbol bodies with FTS5 and return bounded source snippets, symbol IDs and line evidence.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNo
queryYes
profileNo
repo_idYes
max_tokensNo

TDQS

A3.5/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 full burden of behavioral disclosure. It does reveal the FTS5 mechanism, the bounded nature of snippets, and the return contents. However, it does not state whether the operation is read-only, whether an index must exist beforehand, or how limits such as max_tokens affect the results beyond the vague term 'bounded'.

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?

The description is a single, front-loaded sentence with no filler. Every phrase earns its place by specifying scope, mechanism, and return values: 'indexed symbol bodies', 'FTS5', 'bounded source snipets, symbol IDs and line evidence'.

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 5 parameters, no annotations, and no output schema, the description is incomplete. It gives a clear core purpose but omits parameter semantics, tool-selection guidance relative to find_symbols, and any behavioral caveats or result-shaping details, leaving an agent under-informed for correct invocation.

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 the description does not explain any of the five parameters. It hints that 'query' is an FTS5 query but does not clarify repo_id, limit, profile, or max_tokens. The agent cannot reliably infer parameter semantics from the description alone.

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

Purpose5/5

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

The description states a specific verb 'Search', a precise resource 'indexed symbol bodies', the mechanism 'FTS5', and the expected outputs 'bounded source snippets, symbol IDs and line evidence'. This clearly distinguishes it from siblings like find_symbols, which likely focuses on symbols rather than source bodies.

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?

The description implies usage when one needs to search inside symbol source bodies, but it gives no explicit when-to-use guidance, exclusions, or comparisons with sibling tools such as find_symbols or get_symbol_context. The usage context is inferred rather than stated.

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

TDQS

A3.6/5.0
Disambiguation4/5

Each tool targets a distinct capability—repo enumeration, context maps, symbol lookup, impact slices, index freshness, imports, FTS search, file skeletons, and symbol packets—though find_symbols/search_source and get_impact_slice/get_module_dependents sit close enough that an agent may need careful descriptions. Overall boundaries are clear and the descriptions reinforce purpose.

Naming Consistency4/5

The set mostly follows a get_<object> pattern with list_repositories, find_symbols, and search_source as reasonable verb variations. All names are snake_case and consistently place the action before the object, creating a predictable surface.

Tool Count5/5

Nine tools is appropriate for a token-context indexing server: each tool covers a distinct aspect of repository context without redundancy. The count feels neither thin nor overloaded.

Completeness4/5

The surface covers the full workflow: list available repositories, fetch orientation maps, search for symbols and source text, inspect imports and file skeletons, check index freshness, and retrieve bounded context packets. A raw full-file read tool is intentionally absent given the bounded-context purpose, but this is a reasonable design choice rather than a gap.

Maintenance

ActivityMaintained
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to safely interact with local code repositories through MCP tools for search, context building, and workspace management, while keeping all operations local and human-controlled for patch approval.
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A read-only MCP tool that provides local-first, source-backed repository context for coding agents, returning metadata and a bounded read plan without requiring full file reads.
    25
    MIT

Latest Blog Posts

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/MCK564/token-context-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server