ascendc-codemap-mcp
This server checks, builds, updates, and queries AscendC operator CodeMaps (semantic graphs) for a given operator directory and architecture.
codemap_doctor: Verify the machine is ready to build a CodeMap (CANN headers, libclang, project path, architecture).
index_operator: Cold-build/rebuild the operator CodeMap (prepare → extract → analyze → commit); requires project and architecture.
update_operator: Incrementally refresh an existing CodeMap after source changes; optional
confirm_scopeto proceed when scope confirmation is needed.codemap_status: Check whether a committed
.uoCodeMap exists for an operator + architecture, plus mtime/completeness.query_codemap: Read-only graph queries by index, identifier (e.g.
IsPse), Dim/Name=Value (e.g.IsPse=1), or file+line from a previous card.
Provides semantic indexing and querying for AscendC operator code (Huawei's CANN/Ascend DSL), enabling structured queries over TilingData, template specializations, kernel paths, and AscendC API usage.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ascendc-codemap-mcpIndex this operator"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AscendC CodeMap MCP

按 operator + architecture 编译得到的、自包含 AscendC 语义索引。构建把 C++ / CANN DSL 编成唯一、可信、可追溯的语义事实;.uo 是唯一产品真值;Query 把这些事实压缩成面向 AI 的上下文。Agent 只负责理解任务和使用事实。
架构合约见 docs/ARCHITECTURE.md。两条根约束:Build for truth. Project for usefulness. Query 是 semantic projection / compression,不重新分析代码,也不读工作区源码。内部 identity(entity id、USR、provenance)默认不出现在 Agent 卡片上。
这不是通用代码记忆。Agent 的计划、review、ADR 留在会话或调用方(例如 AscendC-Pilot)。
对 SFAG 算子的本地实测:
操作 | 耗时 |
首次构建 CodeMap | 约 1 分钟 |
单次查询 | 约 20 ms |
一次构建,之后反复查询,避免每次重新 grep 和通读源码。
构建需要 CANN Toolkit 头文件和 LLVM clang。查询已有 .uo 不依赖 CANN。环境不会自动配好:先 codemap_doctor,按 next_steps 下载 .run 并用 cann-extract 解包。
它解决什么
AscendC 算子逻辑通常跨多层传递:
Host → TilingData → TilingKey / Template → Kernel → AscendC APIKernel 里看到的行为,往往由 Host 条件决定,再经 TilingData、TilingKey 和模板参数一路传下来。普通搜索能回答「这个名字出现在哪」,很难直接回答:
谁写入了这个 TilingData 字段?哪个 Kernel 读取了它?
哪条 TilingKey / Template 控制这条路径?某个模板组合是否合法?
这段 Kernel 最终落到哪个 AscendC API?
Buffer、Queue、Pipe、Event 之间是什么关系?
CodeMap 把这些关系提前提取进图,让 agent 按标识符、Dim、证据位点查询。
Related MCP server: Lore MCP Server
和 Codebase Memory / CodeGraph
Codebase Memory 与 CodeGraph 是通用代码图:多语言、通用导航。CodeMap 只做 AscendC 算子领域语义。
Codebase Memory / CodeGraph | AscendC CodeMap | |
目标 | 通用代码理解 | AscendC 算子理解 |
解析 | 主要 Tree-sitter | Clang + CANN 编译上下文 |
语言 | 多语言 | C++ / AscendC |
Call graph | 有 | 有 |
Template 语义 | 通用 | 重点建模 |
TilingData / TilingKey | — | 有 |
Host → Kernel 数据流 | — | 有 |
Buffer / Queue / Pipe / Event | — | 有 |
Architecture / 编译条件 | 通用 | 按 arch 产品槽 |
他们更擅长「代码在哪、谁调用谁」。CodeMap 更希望回答:这个算子为什么走到这个 Kernel,以及这个值怎么从 Host 传下来。
本仓库不把 memory / ADR / 文档检索、默认 Cypher/SQL 或可视化做成产品功能。impact 仍是 codemap_query 的一个 operation,会等 resolve dossier 覆盖后再从公开 enum 删除。
为什么用 Clang
Tree-sitter 适合快速、多语言的语法树。AscendC 大量依赖 C++ 编译语义,例如:
template <bool IsPse, typename T>
__aicore__ inline void Process(...)只看语法很难完整恢复模板参数与实例化、类型、宏、architecture 分支、Host 字段写入、TilingKey 选择和 Kernel specialization。因此构建路径是 libclang + 实际 CANN 环境,再叠加 AscendC 专用分析。
当前建模的语义
Host / Tiling: Function、Method、Branch、Predicate、Input、Output、TilingData、Field、Host READ/WRITE、Compile Macro / Variable。
Template / TilingKey: TilingKey、Template、Template Argument / Instance、Build Variant、Binding / Specialization / Selection。
Kernel: Kernel、Operation、Buffer、Register、Queue、Pipe、Event、AscendC API。
边上常见:
READS / WRITES CALLS BINDS SELECTS LAUNCHES
GUARDED_BY FLOWS_TO SAVES / RESTORES SIGNALS / AWAITS串起来仍是:Host 条件 → TilingData 字段 → TilingKey / Template → Kernel → AscendC API。
身份与新鲜度
索引之后用稳定 id,不要每次贴绝对路径:
codemap_id = p:<workspace>::op_name@arch 例如 p:a91f42::flash_attention_score_grad@arch35
alias = op_name@arch 本进程内唯一时可用;撞车返回 AMBIGUOUS_CODEMAP_ID
snapshot_id = cm:<digest 前缀> 已提交图的内容身份,不是 path/mtimecodemap_status 看的是相对当前源码的 freshness,不是「磁盘上有没有 .uo」:
fresh / dirty / stale / building / blocked / incompatible / unknown
读写契约:
ok只表示这次调用在协议层成功。更新是否发生看state和updated。codemap_update得到state=needs_confirmation时图没有前进,需用户确认后再confirm_scope=true。已有
.uo时再调codemap_index会ALREADY_INDEXED(updated=false),应改用codemap_update。正在构建时,查询返回
freshness=building,不会读半写文件。
构建环境(Clang + CANN)
查询已有 .uo 不需要 CANN / Clang。冷构建(codemap_index)需要三者齐备:
Python ≥ 3.10 与本仓库(
pip install -e .)LLVM 18 clang 可执行文件 + pip
libclang(只有 Python 绑定不够,TPL 预处理要跑clang -E)CANN Toolkit 头文件(解包
.run即可,不必在本机完整安装 Toolkit,也不需要 NPU)
Agent 先跑 doctor,再按返回的 next_steps 配环境,不要猜路径:
pip install -e .
python -m ascendc_codemap_mcp doctor --project <算子目录> --architecture arch35ok=false 时执行 next_steps,再跑一次 doctor。不要执行 .run 安装脚本。
Clang / libclang
Ubuntu / Debian:
sudo apt-get update
sudo apt-get install -y clang
python -c "import clang.cindex as c; print(c.__file__)"
clang --versionWindows(LLVM 18 与 pip libclang 18.x 对齐):
winget install --id LLVM.LLVM --version 18.1.8 -e
python -c "import clang.cindex as c; print(c.__file__)"
clang --versionclang 不在 PATH 时:
$env:CLANG_EXE = "C:\Program Files\LLVM\bin\clang.exe"也可设 UO_CLANG / LLVM_HOME。
下载 CANN Toolkit .run
CodeMap 只要 Toolkit 开发套件里的头文件。不要下 kernels / nnal 来代替 Toolkit。
先搜本机,避免重复下载(包很大):
Get-ChildItem -Path "$HOME\Downloads","D:\Downloads","$HOME" -Filter "Ascend-cann-toolkit_*.run" -ErrorAction SilentlyContinuels ~/Downloads/Ascend-cann-toolkit_*.run 2>/dev/null没有文件时,打开昇腾社区下载中心(需要华为账号登录;社区包的直链通常带签名,未登录 wget 会失败):
页面上选 CANN Toolkit,操作系统 Linux,架构:
本机 | 下载哪个 |
Windows / Linux x86_64 |
|
Linux aarch64 |
|
Windows 也下 linux-x86_64 包:cann-extract 只解出文件树,不会执行 installer。
版本尽量与算子真实编译环境一致。部分社区版安装文档会给出 ascend-repo.obs.cn-east-2.myhuaweicloud.com 的 wget;仅当该版本文档写明 URL 时再用,不要随便抓一个旧包。
已有官方安装(source set_env.sh)则把 ASCEND_HOME_PATH 指到安装前缀,不必再解 .run。
解包 CANN(不要跑 installer)
推荐解到本仓库 _cann/pkg,doctor 会自动发现,不必设环境变量:
$pkg = Join-Path (Get-Location) "_cann\pkg"
python -m ascendc_codemap_mcp cann-extract `
"D:\Downloads\Ascend-cann-toolkit_<version>_linux-x86_64.run" `
--dest $pkg
python -m ascendc_codemap_mcp cann-extract --fixup --dest $pkgLinux:
pkg="$(pwd)/_cann/pkg"
python -m ascendc_codemap_mcp cann-extract \
~/Downloads/Ascend-cann-toolkit_<version>_linux-x86_64.run \
--dest "$pkg"
python -m ascendc_codemap_mcp cann-extract --fixup --dest "$pkg"等价写法:python scripts/cann_extract.py ...(checkout 内、尚未 pip install 时)。
解完应能看到:
_cann/pkg/
├── cann-metadef/
├── cann-asc-devkit/
├── cann-opbase/
├── cann-npu-runtime/
├── cann-ge-compiler/
└── bisheng/ # 若包内有ASCENDC_CODEMAP_CANN_ROOT 指 package 根(上面这一层),不要指到某个 include/。解到别处时设用户级环境变量,只写当前会话会丢。
Windows:
[Environment]::SetEnvironmentVariable("ASCENDC_CODEMAP_CANN_ROOT", "<abs-pkg>", "User")Linux:
echo 'export ASCENDC_CODEMAP_CANN_ROOT=/abs/path/to/_cann/pkg' >> ~/.bashrc--fixup 会补 asc/impl/include → asc/include(官方包不带这个目录,vanilla clang 需要这个 junction)。
安装 MCP
pip install -e .
python -m ascendc_codemap_mcp doctor --project <算子目录> --architecture arch35
python -m ascendc_codemap_mcp installWindows:
pip install -e .
python -m ascendc_codemap_mcp installinstall 为已检测到的客户端写入本产品的 MCP 条目和 skills,不改无关 server、不打开 YOLO。uninstall 只删除本产品写入的内容。装完后重启 coding agent。工具出现在 MCP server ascendc-codemap-mcp。
协议是官方 Python SDK 的 2026-07-28(含 stateless server/discover),同一进程仍服务握手期客户端。
不要在 MCP 连接时自动 index。冷构建可能要几分钟。
构建与更新
ascendc-codemap-mcp index --project <算子目录> --architecture arch35产物:
<operator>/.ascendc-codemap/<arch>/<op>.<arch>.uo源码变化后增量刷新(优先 codemap_id):
ascendc-codemap-mcp update --codemap-id <id>
ascendc-codemap-mcp status --codemap-id <id>index 在 prepare / extract / analyze / commit 之间可取消。update 在 detect / plan / 各层 rebuild / commit 之间可取消。某一步内部的 Clang 会跑完该步。取消是每次调用一份 token,不是按 CodeMap 共享。
查询
Query 只读已提交的 .uo(source_line / 图),不打开工作区文件。不知道 ident 时先 search,知道了再 resolve。
CLI:
ascendc-codemap-mcp discover --project <算子目录>
ascendc-codemap-mcp query --codemap-id <id> --symbol IsPse
ascendc-codemap-mcp query --codemap-id <id> --operation search --name BufferNum
ascendc-codemap-mcp query --codemap-id <id> --operation find --kind OPERATION --callee SyncAllAgent 用 typed 工具。operation 是闭集 enum,缺省 resolve。symbol 必须是一个标识符;自然语言句子返回 INVALID_QUERY(合法 filter 清单 + 已解析 token),不会模糊排名。
意图 | 工具 |
扫目录、拿到 |
|
新鲜度 |
|
图查询(ident / Dim / 集合) |
|
从卡片继续 |
|
构建前检查 |
|
冷构建 |
|
增量刷新 |
|
codemap_query 的 operation:resolve(缺省) / search(源码行) / find(集合) / trace(A→B)。contract / impact / entry 仍可用,优先走 resolve。Dim 用 dim + value,不要写 Dim= 字符串。兼容别名:index_operator、update_operator。只读工具带 readOnlyHint。查询结果走统一 envelope(ok、codemap、verdict、layer、data、evidence、coverage、next_cursor)和 structuredContent。
跟 evidence[].id(span:...)走,并把当时的 snapshot_id 当作 expected_snapshot_id;对不上是 SNAPSHOT_CHANGED。coverage.truncated 且带了 next_cursor 再翻页。count: 0 不等于「图上没有」,跟 hint。
回答所问的层:Host 写出 ≠ 模板可编译 ≠ Kernel 消费。不要把 LLM 补丁写进 .uo,不要对产品图跑原始 SQL/Cypher。
资源与传输
类型 | 名称 | URI / 参数 |
Resource | runtime |
|
Resource template | 一张图的身份与新鲜度 |
|
Prompt |
|
|
Prompt |
|
|
codemap_id / architecture 的补全来自本进程 registry 和常见 arch 名。
默认 stdio。同一 SDK server 也可 HTTP(这是传输,不是远程图服务):
ascendc-codemap-mcp serve --transport streamable-http --host 127.0.0.1 --port 8765install 覆盖 Cursor、Claude Code、Codex、OpenCode。Cursor / Claude Code 只写 skills;Codex / OpenCode 另写 AGENTS.md 片段。
环境变量
变量 | 作用 |
| 解包后的 CANN 根(还可回退 |
| clang 可执行文件;仅 pip |
| 缓存目录,默认 |
| 本进程 discover 之后的默认身份;也作 CLI 默认 |
| 打开的查询句柄 LRU 上限,默认 4 |
Codex 子进程只转发 env_vars 里列出的名字;install 会带上 CANN / cache 相关变量。
Windows 可以解 linux-x86_64 .run 再构建;查询已有 .uo 不依赖 CANN。
License
MIT
Available Tools
5 toolscodemap_doctorcodemap_doctorA
Check whether this machine can build an AscendC operator CodeMap: CANN headers, libclang, operator directory, and architecture.
| Name | Required | Description | Default |
|---|---|---|---|
| project | No | Operator directory (absolute path). | |
| architecture | No | e.g. arch35. Required for index paths. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the phrase 'Check whether' credibly signals a non-mutating diagnostic and the colon list reveals exactly what environment conditions are inspected. It does not spell out the result format or whether the check can have side effects, but the core behavior is transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence states the purpose before a colon-delimited list of dependencies. There is no filler or duplication of the schema; every phrase earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity diagnostic with 100% schema coverage, the description gives an agent enough to select and call it correctly. The main gap is the absence of an output schema or a stated return shape (e.g., boolean vs. detailed report), but the core invocation context is complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the parameters are already documented. The description adds context by confirming that 'project' is the operator directory and architecture is one of the checked conditions, but it does not add new syntax or semantics beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific action ('Check whether this machine can build an AscendC operator CodeMap') and a concrete resource, with an explicit list of checked prerequisites (CANN headers, libclang, operator directory, architecture). This clearly distinguishes a preflight diagnostic from the sibling index/update/query tools.
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 use case is implied: call this when you need to know whether the machine is ready to build a CodeMap before running a build or index operation. However, it does not explicitly name alternatives or say when not to use it, leaving some routing to inference.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
codemap_statuscodemap_statusA
Whether a committed .uo CodeMap exists for this operator + architecture, plus mtime and completeness.
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | ||
| architecture | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral disclosure burden, and it does partially by clarifying that the tool reports existence, mtime, and completeness rather than returning CodeMap content. It does not state whether the operation is read-only, what happens when the CodeMap is missing, or any authentication or error behavior. This is adequate for a likely innocuous status check but leaves gaps around edge-case 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 a single sentence that packs the resource, the condition (committed), the parameters (operator + architecture), and the returned attributes (existence, mtime, completeness) with no wasted words. Everything present is informative and directly relevant.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple two-parameter schema and no output schema, the description provides the core return semantics, but it does not describe the response shape, success/failure indicators, or behavior when no committed CodeMap exists. It is functionally complete for a basic status check but could benefit from a note on the return format.
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. It does so by mapping the two parameters to 'this operator + architecture', indicating that 'project' likely refers to an operator and 'architecture' to an architecture. It does not define valid values, formats, or the relationship between the fields, leaving some ambiguity.
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 clear, specific purpose: it checks whether a committed .uo CodeMap exists for a given operator and architecture, and reports mtime and completeness. It is not a tautology and goes beyond the name by naming the exact resource and attributes. However, it does not explicitly contrast itself with siblings like query_codemap or codemap_doctor, so differentiation is implied rather than stated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The wording 'Whether a committed .uo CodeMap exists' implies an agent should use this tool to check existence/status, but there is no explicit guidance on when to reach for it instead of query_codemap or codemap_doctor. It lacks any mention of preconditions, alternatives, or exclusions, so the agent must infer usage from context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
index_operatorindex_operatorA
Build or rebuild the operator CodeMap (prepare → extract → analyze → commit). Requires project + architecture. Do not call on MCP connect; only when the user asks to index or no .uo exists. If a .uo already exists, use update_operator instead.
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Operator directory (absolute path). | |
| architecture | Yes | e.g. arch35. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the burden. It explains the pipeline stages and the rebuild behavior, implying a mutating operation. It also warns against calling on MCP connect. However, it doesn't explicitly state side effects like overwriting an existing .uo or the nature of the output, which would add more transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences deliver the purpose, pipeline, preconditions, and alternative routing without fluff. Critical usage constraints are front-loaded and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given only two required params and no output schema, the description covers the main decision points well: what the tool does, when to call it, and when not to. Minor gaps remain around post-conditions (e.g., what a successful run produces) and whether 'rebuild' is destructive, but these are not critical for a tool with such strong usage guidance.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so both parameters are already documented with types and descriptions. The description only restates that project and architecture are required, adding no additional semantic detail beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Build or rebuild the operator CodeMap' with a pipeline (prepare → extract → analyze → commit). It distinguishes itself from sibling update_operator by explicitly stating when to use that alternative instead.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit conditions for use: 'only when the user asks to index or no .uo exists' and 'Do not call on MCP connect.' It also names the alternative (update_operator) for the opposite case, leaving no ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_codemapquery_codemapA
Read-only operator CodeMap query. Four shapes only: (1) no pattern = index, (2) identifier e.g. IsPse, (3) Dim=Name or Name=Value e.g. IsPse=1, (4) file + line copied from a previous card. Do not pass natural-language sentences.
| Name | Required | Description | Default |
|---|---|---|---|
| file | No | Relative path copied from a previous card. | |
| line | No | ||
| pattern | No | Identifier, Dim=Name, or Name=Value. Omit for index. | |
| project | No | Operator directory. | |
| line_end | No | ||
| architecture | No | e.g. arch35. Required. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden of behavioral disclosure and does state that the tool is read-only and accepts only four shapes. It does not cover invalid-input outcomes or authentication expectations, but the main safety-relevant behavior is clearly disclosed.
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 compact and front-loaded with the read-only nature and allowed shapes. Every sentence adds a useful constraint or clarification, with no filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description covers the main query patterns but leaves line_end undefined, does not explain project/architecture usage, and the schema's 'Required.' note on architecture conflicts with the declared zero required parameters. An agent can use the main forms but may be uncertain about combinations and output 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?
The description adds meaningful semantics beyond the schema by explaining pattern syntax, the file+line combination, and the omission rule for the index case. It does not describe line_end or clarify the requiredness of architecture and project, but the core query semantics are well covered.
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 read-only query operation on the operator CodeMap and enumerates the four accepted input shapes. The read-only qualifier sharply differentiates it from mutation siblings like update_operator.
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 gives explicit valid invocation forms and explicitly says not to pass natural-language sentences. It does not name alternative tools for other use cases, but the context is clear enough for an agent to know how to use this tool.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_operatorupdate_operatorA
Incrementally refresh an existing CodeMap after source changes (detect → plan → rebuild changed layers). Requires an existing .uo. Do not call on MCP connect. Use index_operator only when no .uo exists.
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes | Operator directory (absolute path). | |
| architecture | Yes | e.g. arch35. | |
| confirm_scope | No | Proceed when the plan asks for scope confirmation. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses that this is an incremental rebuild of changed layers, that an existing .uo is required, and that it must not be called on MCP connect. It does not detail side effects or reversibility, but provides substantial behavioral context beyond a bare 'update' label.
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?
Three concise, purposeful sentences. The core purpose is front-loaded, followed by two essential constraints and a clear pointer to the alternative tool. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a mutation tool with no output schema, the description covers prerequisites and usage boundaries well. However, it does not describe the return value or outcome of the plan/confirmation flow, and it doesn't state what happens if confirm_scope is false. This leaves a small but meaningful gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all three parameters (project, architecture, confirm_scope) are already documented in the schema. The description adds no extra parameter-level meaning, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'incrementally refresh an existing CodeMap', and explains the internal pipeline (detect → plan → rebuild changed layers). It clearly distinguishes itself from index_operator ('only when no .uo exists'), leaving no ambiguity about what the tool does.
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 states when to use the tool ('Requires an existing .uo'), when not to use it ('Do not call on MCP connect'), and names the alternative: 'Use index_operator only when no .uo exists.' This is direct and actionable guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool maps to a distinct action: environment check, full build, incremental update, status check, and read-only query. The overlapping index/update pair is explicitly disambiguated by whether a .uo already exists.
The names are readable and domain-consistent, but they do not follow one pattern: codemap_doctor/codemap_status use noun-first style, query_codemap is verb-first, and index_operator/update_operator use _operator suffix. This makes the naming less predictable across the set.
Five tools is well-scoped for an operator CodeMap lifecycle: preflight, full index, incremental update, status, and query. No tool feels redundant at this granularity.
The surface covers the core lifecycle: build/rebuild, update, status, and query, plus environment validation. An explicit delete/cleanup tool is absent, but rebuild and update cover most recovery workflows.
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
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Multiple MCP tools, persistent graph memory, token-saving data pointers, and more.
Agent-driven search: build, import, tune, search, and score result quality — all over MCP.
Remote MCP learning coach for coding agents.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceProvides code intelligence for AI coding agents by indexing repositories into a hybrid knowledge graph, enabling agents to query dependencies, impact, and context through 28 MCP tools.3Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables LLM agents to query a codebase's structural knowledge (symbols, imports, call graphs, etc.) via MCP, reducing tokens and improving correctness compared to raw file access.266MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to search, analyze, and understand multi-language codebases by providing indexed code intelligence via MCP.167527MIT
- AlicenseNot gradedqualityBmaintenanceExposes code graphs across multi-program repositories via MCP, enabling humans and agents to query the fleet with evidence.MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sunye1213106/ascendc-codemap-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server