cpp-coro-graph
Provides tools to index and analyze Linux kernel source code, extracting coroutine and device-domain graphs with query and visualization capabilities.
Click on "Deploy 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., "@cpp-coro-graphWho calls OnSos?"
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.
cpp-coro-graph
一个语法层级(syntax-level)的 C++17 协程 + 设备标签(device) 调用图工具。
主要运行目标:Linux。 仅依赖 Python 3.9+ 标准库(运行时不需要额外 pip 依赖)。
功能概览:
所有函数都建点:包括定义
{...}和声明Foo();/= default/= delete类/结构体成员函数会解析为
Class::Method(含构造/析构)从
co_await/CO_AWAIT提取await边,同时保留普通calls边从
spawn/scope->spawn/sync_wait等 peel 出真实 worker,生成spawn(或 calls)边when_all(...)内的并行任务会 peel 成多条await成员调用链支持:
co_await m.Init()→SosModel::Init通过
rules/devices.json标注 device(cpu/gpu/npu/dsp;与业务 namespace 如yuv_domain区分)文件节点可查;
#include→includes;按 namespace 过滤;ccg seq/--by-namespace提供 HTML 可视化 + CodeGraph 风格 CLI(
ccg)+ MCP 服务
回归样例 fake_sample/
最小化 C++ 树,覆盖 P1–P11(spawn+on_empty、when_all、类成员/重载/模板、header-only、深 await、sync_wait、同名不同 namespace、多级 include、多 stage seq)。
python3 scripts/verify_fake_sample.py # 自动回归(推送前已跑通)
# 人工对照预期:fake_sample/verify.md
ccg index fake_sample && ccg query --namespace nsA::moduleB --kind coroutineRelated MCP server: prayog-repo-fleet
安装 CLI(类似 codegraph)
git clone https://github.com/ArcherLin13/cpp-coro-graph.git
cd cpp-coro-graph
# 把 `ccg` 放到 PATH(~/.local/bin)— 不需要 pip
chmod +x scripts/*.sh scripts/ccg scripts/cpp-coro-graph
./scripts/install_cli.sh
# 确保 ~/.local/bin 已加入 PATH
# 或者:可编辑安装
python3 -m pip install -e .安装后可使用短命令(与 CodeGraph 体验一致):
ccg index /path/to/repo # 生成 .cpp-coro-graph/graph.db
cd /path/to/repo # --db 会向上自动发现
ccg status
ccg status --by-namespace
ccg query OnSos
ccg query --kind file processor.h
ccg query --namespace nsA::moduleB --kind coroutine
ccg node OnSos # symbol: callers + callees
ccg node file:src/foo.cpp # file: contains / includes / importers
ccg callers OnSos
ccg callees OnSos
ccg seq OnSos # ordered calls/await inside a function
ccg explore OnSos # in/out + wider neighborhood
ccg path Call Init # control path A → B(file 查询则走 includes)
ccg impact OnSos
ccg viz --module path/to/module别名关系:cpp-coro-graph == ccg。
不安装也可直接用:./scripts/ccg callers OnSos --db .../graph.db
建库(Index)
ccg index /path/to/your/linux/repo
# 或者一条命令完成 index + HTML + status
./scripts/index_repo.sh /path/to/your/linux/repo日常改代码后增量更新(不用全量 index):
ccg sync /path/to/your/linux/repo
# 或在仓库根目录(自动发现 .cpp-coro-graph/graph.db)
cd /path/to/your/linux/repo && ccg syncsync 会对比文件的 size/mtime,只重解析新增/变更的文件,以及调用到这些文件符号的 caller 文件。
第一次没有 db 时会自动退化为全量 index。
输出文件位于仓库目录下:
.cpp-coro-graph/graph.db.cpp-coro-graph/graph.html(fromccg viz/ index script)
建议在源码所在的 Linux 机器上运行(避免 WSL 的 /mnt/c/... 路径)。
冒烟与回归验证(覆盖 spawn / fx::ex::on / run_* / 模板 co_await):
python3 scripts/validate_fixtures.py # aigc + pipeline + sample
ccg index fixtures/aigc --db /tmp/aigc.db
ccg node run_pipeline --db /tmp/aigc.db
ccg path run_pipeline Init --db /tmp/aigc.db快速查关系
需求 | 命令 |
查符号 |
|
谁调用了 X / X 调用了谁 |
|
只看调用者 |
|
只看被调方 |
|
邻域展开 |
|
A 如何到达 B |
|
变更影响面 |
|
脚本化 JSON 输出 | 加 |
默认边过滤是 control = calls + await。
如果关注结构关系,使用 --edge-kind inherits,contains。
可视化(模块主干)
ccg viz --module path/to/module --depth 2
ccg viz --around Call --depth 2
ccg viz --full # 旧版全图模式,大工程不建议浏览器交互:选择 module → 选择 entry chip → 双击节点展开下一层。calls 默认开启。
OpenCode MCP(快速接入)
和 CodeGraph 类似:先在终端建库,再让 Agent 通过 MCP 只读查询。
重要限制:
MCP 不会
index/sync,也不会生成graph.dbAgent 调
ccg_*时不能临时换另一个 db;启动 MCP 时就定死连接哪一个库源码变更后要在终端跑
ccg sync(或全量ccg index),再继续用 MCP 查
# 1) 先保证 CLI 在 PATH
./scripts/install_cli.sh # 或者: pip install -e .
# 2) 对你的 C++ 仓库建库(这一步必须做;MCP 不会帮你做)
ccg index /path/to/your/repo
# 之后改代码:ccg sync
# 3) 写入 OpenCode 配置(项目级或全局)
cd /path/to/your/repo
ccg install-opencode --agents # 写入 ./opencode.json + AGENTS.md 提示
# 或用户级:
ccg install-opencode --global
# 4) 重启 OpenCode 并检查
opencode mcp list若 opencode mcp list timeout:
调大
timeout通常没用。OpenCode 的timeout是「握手/拉 tools」的等待上限;
一直 timeout = 进程根本没回 initialize(命令起不来、stdout 被缓冲、或 PATH/模块错误),不是“太慢”。
请按下面排查:
# 1) 看 install 写进去的真实 command
ccg install-opencode --agents --db /abs/path/.cpp-coro-graph/graph.db
# 会打印: mcp command: ["/usr/bin/python3", "-u", ".../scripts/ccg_mcp.py", "--db", "..."]
# 2) 手动跑同一条 command(应卡住等 stdin,stderr 有 mcp entry 日志)
python3 -u /path/to/cpp-coro-graph/scripts/ccg_mcp.py --db /abs/path/graph.db
# Ctrl+C 退出。如果立刻 ModuleNotFoundError / 找不到文件 → 先修这个
# 3) 确认 opencode.json 里是 type=local + command 数组(不要用 args/env 旧字段)现象 | 原因 | 处理 |
timeout / MCP error -32001 且调大无效 | 握手无响应(常见:帧头只认 CRLF、进程起不来、stdout 缓冲) | 更新后重装;手动跑 |
command not found: | OpenCode PATH 无 | 重装(新安装器不再依赖裸 |
tools 返回 no graph.db | 还没建库 / cwd 不对 |
|
仅 Windows 全挂 | OpenCode 已知 Windows stdio 问题 | 尽量在 Linux 跑 OpenCode;或升级 OpenCode |
推荐稳妥写法(pin db + 重装配置):
cd /path/to/your/repo
ccg index .
ccg install-opencode --agents --db "$(pwd)/.cpp-coro-graph/graph.db"opencode.json 配置示例(examples/opencode.json 里也有;command 应为绝对 python 路径):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"cpp-coro-graph": {
"type": "local",
"command": ["ccg", "mcp"],
"enabled": true,
"timeout": 15000
}
}
}MCP 怎么选 db?
启动 ccg mcp 时按下面顺序决定唯一的 db,之后所有查询都用它:
配置里显式
--db(最稳)ccg install-opencode --db /abs/path/.cpp-coro-graph/graph.db
→ command 变成["ccg", "mcp", "--db", "/abs/.../graph.db"]未写
--db:从 OpenCode 启动 MCP 时的项目 cwd 向上查找.cpp-coro-graph/graph.db(最多 8 层)
因此推荐:在目标 C++ 仓库根目录执行 ccg index + ccg install-opencode,让 cwd 自动对上该仓库的 db。
MCP 工具(Agent 侧)
工具 | 用途 |
| 符号详情 + callers + callees(建议从这里开始) |
| 单方向查询 |
| 邻域展开( |
|
|
| 变更影响面 |
| 搜索 / 健康检查 |
没有 ccg_index / ccg_sync 工具——建库请用终端 CLI。
Prompt 建议:“use ccg_node on OnSos”,或直接把安装生成的 AGENTS.md 片段贴进系统提示。
Cursor MCP(可选)
同样需要先 ccg index;db 发现规则与上面相同(cwd 向上找,或 args 里加 --db):
{
"mcpServers": {
"cpp-coro-graph": {
"command": "ccg",
"args": ["mcp"]
}
}
}自定义设备规则(device)
字段名为 device(取值 cpu/gpu/npu/dsp),不要与业务 C++ namespace(如 yuv_domain)混淆。
可直接修改 rules/devices.json,或通过 --rules your.json 传入:
{
"patterns": [
{"match": "RunOnNpu", "device": "npu", "backend": "custom"},
{"match": "clEnqueue", "device": "gpu", "backend": "opencl"}
]
}规则按顺序匹配,命中即停;建议把更长、更具体的匹配项放前面。
边类型(Edge kinds)
kind | 可视化 | 含义 |
| 青色实线 | 直接/同步调用 |
| 红色虚线 |
|
| 橙色 | 从 |
| 紫色虚线 | 同一 caller 内:前一个被调 → 后一个被调(顺序) |
| (默认不画) |
|
| 灰色 | 文件包含函数/类 |
| 绿色虚线 |
|
查询提示:
ccg query --kind file module_b/ccg node file:src/foo.cpp— 文件节点 + contains / includes / importersccg query --namespace ns::mod --kind coroutine— 按 namespace 过滤ccg seq Call— 函数内按行号的 calls/await/spawn 序列ccg status --by-namespace— 模块级符号计数文件间:
ccg path file:A.h file:B.cpp、ccg impact pipeline.hpp(走 includes)
callers / callees 默认 control = calls + await + spawn。ccg callees Call 会按源码顺序输出 #1 #2 …。可视化里可切换 seq (顺序);可展开节点会显示 + 和琥珀色边框。
ccg callees Call # 按顺序输出 #1 Init, #2 Load, …
ccg explore Init --edge-kind seq # Init -[seq]-> Load(在 Call 中的下一步)
ccg viz --module .默认跳过目录
.git, build, out, third_party, node_modules, .codegraph, bazel-*, .repo, prebuilts, …
Available Tools
11 toolsccg_calleesB
What this symbol calls / awaits (outgoing). Ordered by source line (#1,#2).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Symbol keyword (name or qualified_name fragment) | |
| show_unresolved | No | Include unresolved::* stubs |
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. It does disclose a real behavioral trait beyond the schema: results are ordered by source line and numbered (#1,#2). It says nothing about resolution behavior, output volume relative to limit, or ambiguity handling.
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 fragments with the core purpose front-loaded and zero filler. The '(#1,#2)' notation is slightly cryptic without further explanation, keeping it from being fully self-explanatory.
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 graph-traversal tool with no output schema and no annotations, the description covers what the tool returns conceptually and its ordering, but omits result shape, what limit does to output, and how unresolved stubs affect results. Adequate but with clear gaps.
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 67%; 'query' and 'show_unresolved' are documented in the schema, while 'limit' has only a type and default. The description adds no meaning to any of the three parameters, so the partially covered fields remain unclarified.
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 relationship being retrieved: the outgoing calls/awaits of a symbol, explicitly labeled '(outgoing)'. That verb+resource framing implicitly distinguishes it from sibling ccg_callers, though no sibling is named outright.
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 when-to-use or when-not guidance. The '(outgoing)' tag hints at the contrast with ccg_callers, but the agent must infer that ccg_callers is the alternative for incoming edges; nothing states prerequisites or that results depend on resolved symbols.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_callersB
Who calls / awaits this symbol (incoming control edges).
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Symbol keyword (name or qualified_name fragment) | |
| show_unresolved | No | Include unresolved::* stubs |
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 says nothing about return format, ordering, pagination, the meaning of the limit parameter, or how unresolved stubs behave. The only behavioral hint is 'incoming control edges', which is more purpose than behavioral detail.
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, front-loaded with the core query semantics. There is no wasted text, and the parenthetical clarifies directionality efficiently. It is appropriately sized for the tool's simple interface.
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 tool has three parameters, no annotations, and no output schema, so the description must carry significant context. It states the purpose but omits when to use it versus alternatives, what the result looks like, how limit is applied, and what show_unresolved affects. An agent would need to infer or experiment with the remaining 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 67%, with the required query parameter and show_unresolved documented but limit undocumented. The description adds no parameter meaning beyond the schema; it merely restates that the query refers to a symbol. It does not compensate for the missing limit description.
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: identifying callers/awaits of a symbol via incoming control edges. It clearly distinguishes itself from the sibling ccg_callees tool by specifying directionality. An agent can tell exactly what this tool returns without opening the schema.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use it (finding incoming edges), but it does not explicitly state alternatives or exclusions. It never mentions sibling tools like ccg_callees or ccg_query, so the agent must infer the contrast. Usage is implied but not guided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_exploreC
Neighborhood around a symbol: in/out + optional BFS depth (like codegraph explore for coroutines).
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| limit | No | ||
| query | Yes | ||
| edge_kind | No | Edge filter: control (default) | all | calls | await | spawn | seq | inherits | contains | includes | control |
| show_unresolved | 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. It implies a read/query operation but never states read-only safety, how the default depth/limit bound results, or what truncated output looks like, leaving behavioral traits largely undisclosed.
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?
One concise, front-loaded sentence with no filler. Compact, though the trailing analogy is more confusing than informative.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 5 parameters, no annotations, no output schema, and only 20% schema coverage, an agent lacks enough information to call this correctly. The description should at minimum explain the query semantics and result shaping.
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 only 20% (edge_kind is the sole documented param). The description covers 'in/out' and 'optional BFS depth', roughly mapping to depth, but says nothing about query, limit, or show_unresolved, so it does not compensate for the coverage gap.
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?
It states a graph-neighborhood operation (in/out edges around a symbol with BFS depth), which is a specific verb-ish concept, but the parenthetical 'like codegraph explore for coroutines' is ambiguous and does not cleanly separate it from siblings such as ccg_callers, ccg_path, or coro_explore.
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 statement of when to choose this over ccg_callers, ccg_callees, ccg_path, or coro_explore. The 'like codegraph explore' aside gestures at a use case but gives no selection criteria or exclusion.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_impactC
Incoming blast radius. Symbols: callers. Files (file:… / *.h): importers via #include.
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| limit | No | ||
| query | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses directionality (incoming only), which is genuinely useful, but says nothing about read-only nature, depth/limit behavior, result shape, or truncation — all relevant for a traversal tool with a default depth of 2 and limit of 80.
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 telegraphic fragments with no filler and the key concept ('incoming') front-loaded. But the extreme terseness tips into under-specification — the fragments read as notes rather than a usable instruction, so concision comes at the cost of clarity.
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 3-parameter traversal tool with no annotations and no output schema, the description is too thin: an agent cannot infer what depth/limit control, whether results are capped, or what the returned structure looks like.
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 for all three parameters. It partially explains the query forms (bare symbol, file:…, *.h glob), but depth and limit are never mentioned, and the file:… syntax is left cryptic.
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 operation — incoming dependency/impact analysis — and maps the two input kinds to their results (symbols → callers, files → importers via #include). That is enough to distinguish it from an outgoing tool, but it never names or differentiates itself from the sibling ccg_callers, which appears to overlap.
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 'Symbols: … Files: …' fragments implicitly tell the agent which query form yields which result, which is real usage guidance. However, there is no statement of when to prefer this over ccg_callers, ccg_callees, or ccg_explore, and no prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_nodeC
One symbol or file: location + related edges. Symbols → callers/callees (control). Files → contains (symbols) + includes (headers) + importers.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Symbol keyword (name or qualified_name fragment) | |
| show_unresolved | No | Include unresolved::* stubs |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, but it does disclose the return content: location plus which edge types are produced per node kind (callers/callees for symbols; contains/includes/importers for files). What's missing is whether this is read-only, whether edges are directional, and any limits on how many edges are returned.
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 tight sentences with no filler, front-loading the core output then the per-type edge breakdown. Efficient, though the telegraphic style borders on under-specification.
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 graph-lookup tool with no output schema and ten siblings, the description does not explain invocation (query syntax, direction/semantics of returned edges) or when this beats ccg_callers/ccg_callees. It gives partial return-value context but leaves key operational questions unanswered.
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 67%, and the description mentions none of the three parameters. The 'query' parameter's meaning (symbol keyword or qualified_name fragment) and 'show_unresolved' are only explained in the schema, so the description adds no parameter value and does not compensate for the coverage gap.
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 conveys that the tool returns a single node's location plus related edges, and it distinguishes between symbol and file node types. However, there is no explicit verb ('get/retrieve') and the cryptic name 'ccg_node' needs the description to carry full meaning. It differentiates symbol vs. file behavior, which helps against siblings.
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 guidance on when to use this tool versus alternatives like ccg_callers, ccg_callees, or ccg_explore. The description implies it covers both caller/callee edges and file containment, but doesn't say when a direct node lookup is preferred over those specialized siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_pathC
Shortest path between two symbols (control) or two files (includes). Use file:path or *.hpp queries for include topology.
| Name | Required | Description | Default |
|---|---|---|---|
| dst | Yes | ||
| src | Yes | ||
| depth | No | ||
| limit | 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. It does not disclose whether the operation is read-only, whether results are deterministic, how depth/limit affect output, or any error conditions. Only a minimal hint about include topology is given.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence with no filler. Efficient, though it could be slightly more structured to separate the control-vs-include modes.
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 4-parameter graph query tool with no annotations, no output schema, and incomplete parameter descriptions, the definition is insufficient. It doesn't explain return values, depth/limit behavior, or when the tool is appropriate versus siblings.
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 0% and the description only hints that 'src' and 'dst' can take file:path or *.hpp forms. It does not explain what 'depth' or 'limit' mean or how they constrain the path search, leaving half the parameters undocumented in both schema and description.
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+resource: 'shortest path between two symbols (control) or two files (includes)', making the operation clear. It distinguishes itself from siblings like ccg_query or ccg_node by naming the graph-traversal semantics, though it doesn't explicitly reference them.
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?
Provides a usage hint ('Use file:path or *.hpp queries for include topology') that indicates a query syntax context, but does not state when to prefer this tool over alternatives like ccg_callers or ccg_explore, nor any prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_queryB
Search symbols or file nodes by name/qname/path fragment. Use kind=file for files; namespace= for C++ namespace filter (exact or nested prefix). Empty query + namespace lists that module.
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Filter by node kind. MUST be one of: function | coroutine | declaration | class | file | |
| limit | No | ||
| query | No | Symbol/file fragment (e.g. 'run_net', 'pipeline.hpp', 'file:src/foo.cpp'). May be empty when namespace is set. | |
| namespace | No | C++ namespace filter (exact or prefix). Example: 'airaw::aigc' matches that ns and nested. | |
| path_prefix | No | Only nodes whose file_path starts with this prefix |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are supplied, so the description carries the full behavioral burden. It never states this is a read-only lookup, says nothing about the default limit of 30 or result truncation/pagination, and does not describe result shape; only the empty-query-plus-namespace listing behavior is 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?
Three compact clauses with the core purpose front-loaded and no filler. The final claim about an empty query plus namespace listing 'that module' is slightly terse, but overall it is tightly written.
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 5-parameter search tool with no annotations and no output schema, the description covers querying and filtering adequately. It is silent on the default limit, result caps, and ordering, which an agent needs to use the tool predictably.
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 80%, so the schema already documents kind, query, namespace, and path_prefix. The description reinforces kind=file and the exact/nested namespace semantics but adds no format detail beyond the schema, which merits the baseline 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (search) and resource (symbols or file nodes) plus the matching basis (name/qname/path fragment). Clear on its own, but it never distinguishes itself from sibling graph tools like ccg_node, ccg_explore, or ccg_path.
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?
Gives useful conditional guidance ('Use kind=file for files', 'Empty query + namespace lists that module'), which implies how to drive it. It stops short of saying when to pick this over ccg_node or ccg_explore, so usage 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.
ccg_seqA
Ordered calls/await sequence inside a function (by source line). Preferred over explore edge_kind=seq for understanding in-function order.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | Symbol keyword (name or qualified_name fragment) | |
| show_unresolved | No | Include unresolved::* stubs |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose the key behavioral trait: results are ordered by source line, and it is a preferred alternative to explore. However, it says nothing about return shape, how limit truncates the sequence, or what unresolved stubs imply.
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 tight sentences with zero waste; the core capability is front-loaded ahead of the routing hint. Nothing redundant.
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 output schema and no annotations mean the description should carry more of the load. It conveys what the sequence is and its ordering, but omits result shape, limit semantics, and how unresolved entries appear, leaving the agent to infer these.
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 67% (query and show_unresolved are documented, limit is not). The description implies query identifies a function symbol, which adds a little meaning, but it does not clarify limit or show_unresolved behavior. Baseline 3 is appropriate where the schema does most of the work.
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?
Names a specific resource and scope: the ordered call/await sequence inside a single function, ordered by source line. It also explicitly distinguishes itself from the sibling ccg_explore path (edge_kind=seq), so an agent can choose without opening schemas.
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?
Gives a clear positive condition ('understanding in-function order') and names the alternative it supersedes (explore edge_kind=seq). It does not state when this tool is the wrong choice (e.g., cross-function or interprocedural ordering), leaving a small gap.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ccg_statsA
cpp-coro-graph: node/edge counts by kind and device. Optional by_namespace=true for per-namespace symbol counts. Call first to confirm the graph DB is loaded.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| namespace | No | Optional namespace filter (exact or prefix) when by_namespace | |
| by_namespace | No | If true, return symbol counts grouped by C++ namespace |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden, and it does disclose one useful trait: it should be called first as a DB-loaded health check, implying failures when the graph is absent. It does not describe what happens on an unloaded DB, cost/latency, or the response shape.
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 short, front-loaded sentences with no padding: what it counts, the optional grouping mode, and the call-first advice. The "cpp-coro-graph:" prefix is slightly redundant but sets domain context cheaply.
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 zero-required-parameter stats tool with no output schema and no annotations, the description covers the core use and the call-first check. It is still thin on limit semantics and failure behavior, which matter given the absence of structured hints.
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 67%; by_namespace and namespace are already documented in the schema, and the description largely restates by_namespace's meaning. The limit parameter has no description in either place, so the description does not compensate for the coverage gap.
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 concrete verb and resource: node/edge counts broken down by kind and device, plus an optional per-namespace mode. It is distinguishable from query/node/callers siblings, but it never clarifies how it differs from the very similar sibling coro_stats.
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?
"Call first to confirm the graph DB is loaded" gives explicit ordering guidance that an agent can act on. However, no condition is given for choosing ccg_stats over coro_stats, so the routing guidance is incomplete.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
coro_exploreD
Alias of ccg_explore (legacy).
| Name | Required | Description | Default |
|---|---|---|---|
| depth | No | ||
| limit | No | ||
| query | Yes | ||
| device | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries full responsibility for behavioral disclosure, but it reveals nothing about side effects, permissions, rate limits, or return behavior. 'Legacy' is the only trait mentioned and it is not behavioral.
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 single sentence is concise and front-loaded, but for a tool with four parameters and no other documentation, this level of brevity is under-specification rather than effective conciseness. It does not earn its place as sufficient 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 four parameters, no annotations, no output schema, and numerous sibling tools, the description is far too sparse. It does not explain the tool's operation, parameter usage, or how it relates to the sibling ccg_explore beyond a bare alias statement.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 4 parameters with 0% description coverage, and the description does not mention any of them (query, depth, limit, device). It offers no meaning, format, or constraints beyond what the bare schema shows.
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 only states that this tool is an alias of ccg_explore (legacy). It does not provide a verb or resource to explain what the tool actually does, so an agent cannot understand its purpose without already knowing ccg_explore.
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 word 'legacy' hints that this tool is deprecated and that ccg_explore may be preferred, but there is no explicit instruction on when to use this tool versus ccg_explore or other siblings. No usage conditions or exclusions are given.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
coro_statsC
Alias of ccg_stats.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden. It discloses nothing about safety, permissions, side effects, return format, or operational limits. 'Alias of ccg_stats' is a pointer with zero behavioral detail.
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 with no filler, and the alias relationship is front-loaded. There is no wasted text or buried detail.
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 tool has no parameters, no output schema, and no annotations, so the description could be complete with very little. However, it only references ccg_stats and provides no self-contained purpose or behavior. An agent must consult another tool's definition to use this one meaningfully.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool takes zero parameters, so there are no parameter semantics to explain. The schema is empty and no additional parameter meaning is needed. Baseline of 4 applies for a zero-parameter tool.
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 only states that the tool is an alias, without naming the verb or resource it operates on. It does point to the sibling ccg_stats, which lets an agent infer equivalence, but the actual purpose (what stats are computed) is left entirely to the sibling. This is more than a tautology but still vague on its own.
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 on when to call coro_stats versus ccg_stats or any other sibling. The word 'alias' implies interchangeability, but the description does not state conditions, prerequisites, or exclusions. An agent gets no routing help beyond the bare equivalence.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
11 tool updates
v0.1.0- First observed
ccg_callees - First observed
ccg_callers - First observed
ccg_explore - First observed
ccg_impact - First observed
ccg_node - First observed
ccg_path - First observed
ccg_query - First observed
ccg_seq - First observed
ccg_stats - First observed
coro_explore - First observed
coro_stats
TDQS
Scored across 11 tools
Many tools have clear distinct purposes (stats, query, node, callers, callees, seq, path, impact), but ccg_explore and ccg_seq overlap with ccg_node's related edges and callers/callees, creating some ambiguity. The presence of aliases (coro_stats, coro_explore) adds confusion for an agent.
Most tools follow a consistent ccg_verb or ccg_noun pattern (ccg_stats, ccg_query, ccg_node, ccg_callers, etc.), which is predictable. However, the aliases coro_stats and coro_explore deviate from the ccg_ prefix, slightly breaking consistency.
11 tools is a reasonable count for a graph-based code analysis server covering stats, query, traversal, and impact. The two aliases are redundant but don't bloat the count excessively.
The tool set covers essential operations: graph stats, symbol/file lookup, edge exploration (callers, callees, sequence), path finding, and impact analysis. It lacks explicit filtering or aggregation tools, but the core analysis surface is well-covered for a read-only graph explorer.
Maintenance
Related MCP Connectors
Hosted code graph over MCP: exact callers, dependencies, and cross-repo blast radius for AI agents.
Repository knowledge graph MCP server for codebase understanding and debugging.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Codebase graphs, caller impact analysis, and recorded project context for AI coding agents.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceBuilds a semantic knowledge graph of C++ code and exposes 9 MCP tools for AI assistants to search classes, functions, inheritance, callers, callees, overrides, and more.3-
- AlicenseNot gradedqualityBmaintenanceExposes code graphs across multi-program repositories via MCP, enabling humans and agents to query the fleet with evidence.MIT
- FlicenseNot gradedqualityAmaintenanceCodeGraph MCP is a powerful standalone tool that parses your entire C/C++ codebase into a semantic knowledge graph and seamlessly exposes it to AI coding assistants via the Model Context Protocol (MCP). By providing AI (like Claude Desktop, Cursor, or Google Antigravity) with a structural map of your project—including caller/callee relationships, file dependencies, and dynamic function definition1-
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to query a local, continuously updated symbol graph of a codebase, providing ranked search, caller/callee exploration, dependency paths, and git-diff impact analysis through MCP tools.21 npmApache 2.0