token-context-mcp
Token Context MCP
token-context-mcp es un servidor MCP local de solo lectura que indexa repositorios registrados y devuelve pequeños paquetes de contexto de código con hash de fuente. Está diseñado para reducir el rastreo amplio de repositorios sin pretender que el análisis sintáctico sea un modelo semántico completo.
Qué se implementa en 0.1.0
registro explícito de repositorios; las herramientas MCP reciben un
repo_id, nunca una ruta arbitraria;análisis sintáctico con Tree-sitter para Python, JavaScript y TypeScript/TSX;
instantáneas SQLite con archivos, símbolos, aristas léxicas, manifiestos y hashes de fuente;
mapas de repositorio con presupuesto de tokens, esqueletos respaldados por la fuente, contexto de símbolos y segmentos de impacto acotados;
superficie de herramientas estrictamente de solo lectura sobre MCP
stdio;reglas de denegación estricta para secretos/metadatos, comprobaciones de recorrido de rutas/puntos de reparse y límites de recursos;
bancos de pruebas de seguridad, integración y rendimiento que reportan evidencia en lugar de afirmar ahorros universales.
Related MCP server: repogrammar_context
No objetivos y límite de seguridad
Este servidor no edita archivos, no ejecuta comandos de shell, no escucha en HTTP, no llama a APIs de red ni acepta rutas de repositorio arbitrarias. stdio no es un sandbox del sistema operativo: despliegue con una política de no-egress/mínimos privilegios si se requiere un límite de red impuesto. Los resultados de las herramientas pueden colocarse igualmente en el contexto LLM del host MCP.
Inicio rápido
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 serveDe forma predeterminada, el registro es global para el usuario actual de Windows en %APPDATA%\token-context-mcp\repos.toml; es independiente del directorio de trabajo actual. Defina TOKEN_CONTEXT_CONFIG para usar una ruta TOML explícita, compartida o portátil. Para Codex, inicie el paquete mediante un comando MCP stdio configurado. Use únicamente las herramientas de solo lectura que lista el servidor.
Registrar repositorios de forma segura
El registro es una decisión explícita de lista de permitidos local, no una carga, una operación de Git ni un cambio de código fuente. --repo-id es un identificador estable utilizado en las solicitudes MCP; --root es el único directorio canónico del repositorio que el servidor puede leer.
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-lecturerUse una raíz de proyecto específica, nunca un directorio padre amplio como D:\AI. Vuelva a ejecutar index después de los cambios relevantes; reutiliza los resultados de análisis sin cambios. Los registros y las bases de datos de índice existentes se comparten entre todos los procesos MCP iniciados bajo el mismo usuario de Windows.
Para usar una ubicación de registro diferente en una terminal o en un despliegue portátil, defínala antes de registrar, indexar e iniciar el servidor 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 myrepoUso desde agentes de programación
Este es un servidor MCP stdio local. Funciona con un cliente que pueda iniciar procesos locales y tenga uv disponible en su PATH. Cada proceso de cliente iniciado bajo el mismo usuario de Windows lee automáticamente el mismo registro global de repositorios. Reinicie el cliente después de cambiar el registro o su política.
Cliente | Soporte de | Estado de configuración |
Codex CLI / IDE | Sí | Instalado y probado de extremo a extremo en esta máquina. |
Claude Code | Sí | Compatible; añádalo en el ámbito de usuario o de proyecto. |
GitHub Copilot CLI | Sí | Compatible mediante la configuración de usuario de la CLI o la configuración del proyecto. |
GitHub Copilot Chat en VS Code | Sí | Compatible mediante |
Google Antigravity IDE / CLI | Sí | Compatible mediante |
Claude Desktop | Condicional | Admite MCP local mediante Desktop Extensions, pero este proyecto aún no publica un paquete |
Los agentes de nube/web no pueden iniciar este servidor en esta máquina Windows. Necesitan un servicio MCP HTTP autenticado desplegado por separado; este proyecto incluye intencionalmente solo transporte stdio local.
Codex
Hay dos formas de conectar Codex a token-context-mcp:
Método A: Mediante la CLI de Codex
codex mcp add token-context -- uv run --directory D:\AI\token-context-mcp token-context serve --transport stdio
codex mcp get token-contextMétodo B: Archivo de configuración directo (~/.codex/config.toml)
Si el comando codex no está disponible en su PATH de PowerShell, añada directamente el servidor a %USERPROFILE%\.codex\config.toml:
[mcp_servers.token-context]
command = "uv"
args = ["run", "--directory", "D:\\AI\\token-context-mcp", "token-context", "serve", "--transport", "stdio"]Consejo para GUI: Si Codex no puede encontrar
uv, sustituya"uv"por la ruta absoluta:"C:\\Users\\<YourUser>\\AppData\\Roaming\\Python\\Python312\\Scripts\\uv.exe".
Claude (Claude Code y 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-context2. Claude Desktop (aplicación de Windows)
Abra o cree %APPDATA%\Claude\claude_desktop_config.json (p. ej., C:\Users\<YourUser>\AppData\Roaming\Claude\claude_desktop_config.json) y añada:
{
"mcpServers": {
"token-context": {
"command": "uv",
"args": [
"run",
"--directory",
"D:\\AI\\token-context-mcp",
"token-context",
"serve",
"--transport",
"stdio"
]
}
}
}Registro y uso de task2-demo
1. Registrar e indexar el repositorio
Ejecute estos comandos en PowerShell (registra globalmente en %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-demo2. Ejemplo de prompt para Codex / Claude / Antigravity
Después de reiniciar Codex, Claude o Antigravity, envíe este prompt en el chat:
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".Si un cliente no puede iniciar el servidor, ejecute primero uv run --directory D:\AI\token-context-mcp token-context serve --transport stdio en PowerShell para comprobar su entorno de Python. Los clientes GUI a veces no heredan el PATH de una terminal; en ese caso, establezca command en la ruta absoluta de uv.exe y reinicie el cliente.
Referencias oficiales de configuración de clientes: OpenAI Codex, Claude Code, GitHub Copilot CLI, GitHub Copilot en IDE, Antigravity y Claude Desktop.
Límites de tokens y recursos
El registro global tiene una política [server] exigible. Edite el TOML y reinicie Codex para aplicar un cambio:
[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_tokenslimita la salida de mapas, esqueletos y contexto de símbolos. Es el control principal para el consumo de contexto del modelo.max_graph_nodeslimita el recorrido de los segmentos de impacto.max_symbol_resultslimita los resultados de búsqueda.max_request_bytesrechaza las entradas MCP sobredimensionadas.
Los valores más bajos reducen los tokens, pero provocan más truncamientos y llamadas de seguimiento. El servidor solo limita el contexto que devuelve; no puede imponer un límite de facturación estricto del proveedor para una sesión completa de Codex/modelo.
Comandos
register: añade una raíz de repositorio canónica y sin enlaces a un registro TOML local.index: construye una instantánea SQLite atómica y un manifiesto JSON.status: inspecciona la instantánea almacenada y detecta archivos modificados después de la indexación.serve: inicia el servidor MCPstdio.benchmark-report: calcula estadísticas resumidas a partir de un registro de ejecución JSONL instrumentado.release-materials: genera un artefacto inicial de SBOM/procedencia; la firma y la evidencia de sandbox del sistema operativo siguen siendo responsabilidades del despliegue.
Contrato de herramientas
get_repo_mapfind_symbolsget_file_skeletonget_symbol_contextget_impact_sliceget_index_status
Cada resultado es un envoltorio JSON con index_run_id, freshness, budget, warnings y evidencia de fuente. Una arista léxica se marca explícitamente como ambiguous; una arista no resuelta no es prueba de que no exista ninguna relación.
Desarrollo
uv run pytest
uv run token-context release-materials --output supply-chainConsulte SECURITY.md y docs/ para conocer el modelo de amenazas, las instrucciones de integración y el protocolo de evaluación comparativa.
Available Tools
9 toolsfind_symbolsFind symbolsC
Find source-backed symbols by name or qualified-name fragment. Returns IDs and spans, never arbitrary files.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | ||
| limit | No | ||
| pattern | Yes | ||
| profile | No | ||
| repo_id | Yes | ||
| max_tokens | No |
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 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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| profile | No | ||
| repo_id | Yes | ||
| max_tokens | No | ||
| include_private | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| profile | No | ||
| repo_id | Yes | ||
| direction | No | both | |
| max_nodes | No | ||
| symbol_id | Yes | ||
| max_tokens | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| repo_id | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| module | No | ||
| profile | No | ||
| repo_id | Yes | ||
| max_tokens | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | ||
| format | No | ||
| profile | No | ||
| repo_id | Yes | ||
| budget_tokens | No | ||
| include_tests | No | ||
| include_omitted_ids | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| profile | No | ||
| repo_id | Yes | ||
| symbol_id | Yes | ||
| max_tokens | No | ||
| include_body | No | ||
| include_omitted_ids | No |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| profile | No | ||
| repo_id | Yes | ||
| max_tokens | No |
TDQS
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.
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.
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.
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.
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.
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
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.
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.
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.
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
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
Project memory, semantic code search, and grounded agent context.
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Codebase intelligence for agents: 152 structured artifacts across 21 programs, one call.
The Cortex MCP server provides read-only access to real-time engineering context from the Cortex developer portal, allowing AI coding assistants to answer natural language questions about your organization's catalog (microservices, libraries, domains, teams, infrastructure), scorecards (engineering standards and best practices), initiatives (goals and deadlines), and Engineering Intelligence metrics. It includes tools for querying documentation, tracking personal entities, and accessing AI-assisted insights across the entire Cortex ecosystem.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables 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
- AlicenseNot gradedqualityAmaintenanceA 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.25MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a codebase as a knowledge graph, providing token-budgeted context, search, and impact analysis via MCP tools.MIT
- AlicenseAqualityBmaintenanceMCP server that inspects local codebases and generates source-grounded context packs for coding agents, with tools for repository search, symbols, dependencies, Git analysis, and context generation.26MIT
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/MCK564/token-context-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server