Skip to main content
Glama
banderzhm
by banderzhm

ModAST-MCP

C++20/23 프로젝트용 모듈 인지 AST MCP 서버입니다. 일반 AST/LSP 작업에는 지속적인 clangd 프로세스를 사용하고, clangd 22가 심볼로 노출하지 않는 엔티티(module, export module, import 엣지)에 대해서는 소스 수준 모듈 인덱스를 유지합니다.

실행

npm install
npm run build
node dist/index.js

서버는 MCP stdio 전송을 사용합니다. Codex/Claude Desktop에서는 node dist/index.js를 가리키도록 명령을 지정하세요.

Related MCP server: DevContext

Windows + Arch WSL

{
  "mcpServers": {
    "modast": {
      "command": "node",
      "args": ["D:/runtime/mcp/ModAST-MCP/dist/index.js"]
    }
  }
}

먼저 워크스페이스를 여세요:

{
  "root": "E:/github/cnetmod",
  "buildDirectory": "E:/github/cnetmod/cmake-build-release-wsl",
  "transport": "wsl",
  "wslDistro": "Arch",
  "experimentalModules": false
}

mode는 auto, cpp, 또는 modules를 허용하며 기본값은 auto입니다. 자동 모드는 모듈 확장자와 -x c++-module, -fmodule-output, /interface, /ifcOutput 같은 컴파일러 플래그를 확인합니다. 순수 cpp 모드는 PCM/modmap 발견을 건너뛰고 clangd의 실험적 모듈 지원을 활성화하지 않습니다.

workspace_open은 운영 체제 임시 디렉터리 아래에 증강된 컴파일 데이터베이스를 생성하며, 워크스페이스와 빌드 경로의 해시로 격리됩니다. CMake/Ninja가 생성한 .modmap 파일을 재사용합니다. 생성된 맵이 없는 소비자 번역 단위의 경우 기존 PCM 파일에 대한 소스 수준 import를 해석하고 알려진 모든 전이적 PCM 매핑을 포함하는 캐시된 응답 파일을 생성합니다. 이 빠른 경로에서는 experimentalModules를 끄고, 필수 PCM 파일이 없을 때만 켜세요.

workspace_warm은 비차단입니다. 지속적인 clangd 백그라운드 인덱스를 구축하는 동안 workspace_status를 호출하세요. 파일을 연 후에는 동일한 clangd 세션에서 쿼리가 제공됩니다.

개발 업데이트 및 디스크 쓰기

워크스페이스는 compile_commands.json에 있는 파일과 알려진 .pcm 및 .modmap 아티팩트만 감시합니다. 저장소의 모든 파일을 재귀적으로 감시하거나 재스캔하지 않습니다.

  • 소스를 편집하면 메모리의 모듈 그래프가 업데이트됩니다. 열린 문서는 textDocument/didChange를 통해 clangd로 전송되며, ModAST 캐시 파일은 작성되지 않습니다.

  • 모듈 인터페이스를 편집하면 해당 모듈이 stale로 표시됩니다. 해당 PCM이 재빌드될 때까지 AST, 정의, 참조, 진단 응답에 경고가 포함됩니다.

  • PCM, modmap, 컴파일 데이터베이스 변경은 하나의 워크스페이스 새로 고침으로 디바운스됩니다. 이는 일반적인 편집 -> Ninja/CMake 빌드 -> 쿼리 루프를 처리합니다.

  • 새 번역 단위는 빌드 시스템이 compile_commands.json을 업데이트한 후 workspace_refresh로 선택됩니다.

  • 생성된 컴파일 데이터베이스와 응답 파일은 콘텐츠 비교를 사용합니다. 동일한 콘텐츠는 다시 작성되지 않습니다. workspace_status.compileDatabase는 최신 준비에 대한 diskWrites와 cacheFilesReused를 보고합니다.

  • 임시 워크스페이스 캐시는 열 때 14일 TTL, 비활성 워크스페이스 20개 제한, 비활성 캐시 512MB 제한으로 정리됩니다. 활성 워크스페이스는 유지되며 정리 결과는 workspace_status.cacheCleanup으로 노출됩니다.

  • 의미 쿼리는 진행 중인 새로 고침을 기다리므로 중지된 클라이언트가 아닌 교체된 clangd 프로세스에 대해 실행됩니다.

workspace_status는 sourceChanges, lastChangeAt, watchedFiles, staleModules, refreshes도 보고하므로 에이전트가 크로스 모듈 데이터가 최신인지 결정할 수 있습니다.

장기 실행 도구와 workspace_open은 클라이언트가 진행 토큰을 보내면 MCP notifications/progress를 내보냅니다. 느린 clangd 요청은 5초마다 하트비트를 내보냅니다. workspace_status는 폴링에도 안전합니다. phase, progressCompleted, progressTotal, elapsedMs, 그리고 마지막 20개의 사람이 읽을 수 있는 events를 포함합니다.

도구

  • workspace_open, workspace_status, workspace_refresh, workspace_warm

  • module_search, module_graph

  • module_quality, format

  • ast, document_symbols, workspace_symbols

  • definition, references, diagnostics

줄 및 문자 인자는 1부터 시작합니다. 에이전트 사용의 경우 definition과 references는 needle과 occurrence를 받아 수동 위치 계산을 피합니다.

format은 clangd/clang-format에 위임하며 프로젝트의 .clang-format을 존중합니다. 기본적으로 미리보기 전용이며 포맷된 텍스트와 LSP 편집을 반환합니다. 소스를 작성하려면 apply=true가 필요합니다. 적용 전에 서버는 파일이 clangd 스냅샷과 여전히 일치하는지 확인합니다. 동시 편집기 변경은 덮어쓰기 대신 충돌 오류를 발생시킵니다. 성공적인 쓰기는 동일 디렉터리의 임시 파일과 원자적 이름 변경을 사용한 후 지속적인 clangd 문서를 동기화합니다.

module_quality는 소스 정규식 대신 clangd AST 노드를 사용합니다. 모듈 인터페이스 단위에서 실질적인 함수 본문을 보고하며, 템플릿과 constexpr/consteval 정의는 무시하고, 명명된 모듈에 .cpp, .cc, .cxx 구현 또는 파티션 구현 단위가 없으면 경고합니다. 두 번째 비내보내기 .cppm은 이 아키텍처 검사를 충족하지 않습니다. 임계값과 동시성은 구성 가능합니다.

설계 노트

  • clangd의 textDocument/ast는 clangdAst 아래에 변경 없이 반환됩니다.

  • 합성 moduleContext는 export module ...에 대해 clangd 22가 AST 노드를 반환하지 않고 워크스페이스 심볼로 모듈 이름을 인덱싱하지 않기 때문에 모듈 단위와 import를 추가합니다.

  • 모듈 파싱은 의도적으로 소스 기반이며 컴파일러 공급업체와 독립적입니다. clangd 프로세스는 C++ 선언에 대한 의미론적 권위자로 남아 있습니다.

  • transport가 wsl인 경우 Windows 워크스페이스 경로는 프로세스 경계에서만 /mnt/<drive>/...로 변환되며, MCP 응답은 Windows 경로로 다시 매핑됩니다.

  • MCP stdio를 닫거나, stdin을 종료하거나, SIGINT/SIGTERM을 보내면 파일 감시자가 닫히고 clangd가 정상적으로 종료됩니다.

검증

npm test는 단위 및 수명 주기 테스트를 실행합니다. MODAST_INTEGRATION=1을 설정하면 라이브 clangd 테스트가 추가됩니다. Windows에서는 Arch WSL을 사용하고 Linux에서는 네이티브 clangd를 사용합니다. GitHub Actions는 Windows와 Linux에서 Node.js 20 및 24를 테스트하고, 라이브 Linux clangd 테스트를 실행하며, 높은 심각도의 프로덕션 종속성 권고를 거부합니다.

Available Tools

14 tools
astA

Return clangd's detailed AST plus synthetic module context for module declarations/imports.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes
endLineNo
startLineNo
endCharacterNo
startCharacterNo

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses that the output includes the AST and synthetic module context, which is useful, but does not detail output format, size limits, performance implications, or error conditions. It adds some transparency but is not comprehensive.

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

Conciseness4/5

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

The description is a single, concise sentence that is front-loaded with the core purpose. It has no filler and directly states what the tool returns, though it could be slightly more structured by adding a note about parameter usage.

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

Completeness3/5

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

Given the complexity of returning a detailed AST, the description is somewhat minimal. It mentions synthetic module context, which is helpful, but lacks details on output structure or how range parameters affect the result. With no output schema and no annotations, it does not fully cover the context needed for an agent to use it correctly.

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

Parameters2/5

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

The schema has 5 parameters with 0% description coverage, and the description does not explain any parameters. It mentions the file and module context but does not clarify the role of startLine, endLine, startCharacter, or endCharacter beyond their names. The description fails to compensate for the low schema coverage.

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

Purpose5/5

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

The description clearly states the tool returns clangd's detailed AST and adds synthetic module context for module declarations/imports. It uses a specific verb ('Return') and distinguishes from sibling tools like document_symbols and module_graph, which serve different purposes.

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

Usage Guidelines3/5

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

The description implies usage for inspecting AST and module context, but does not explicitly state when to use this tool versus alternatives like document_symbols or module_search. There are no exclusions or explicit context provided, so guidance is mostly implied.

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

definitionB

Find a declaration/definition across module BMIs. Position values are 1-based; needle is often easier for agents.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes
lineNo1-based line
needleNoText to locate instead of line/character
characterNo1-based UTF-16 character
occurrenceNo
includeHoverNo

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It explains position indexing (1-based) and suggests the needle parameter, but it does not describe return values, failure behavior, or path/workspace expectations.

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

Conciseness4/5

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

The description is short, front-loaded, and contains no filler. Every sentence contributes either to purpose or to usage guidance, though a bit more context would not hurt.

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

Completeness2/5

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

For a tool with 6 parameters, no annotations, and no output schema, this description is too thin. It does not explain how file paths are resolved, why one might use line/character vs needle plus occurrence, or what the result contains, making full reliable invocation not fully supported.

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

Parameters3/5

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

The description adds some value by advising that needle is often easier for agents and noting that positions are 1-based, but the schema already covers 1-based line and character semantics. Several parameters such as occurrence and includeHover are still not semantically clarified enough for an agent to choose confidently.

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

Purpose4/5

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

The description uses a specific verb ('Find') and identifies the resource ('a declaration/definition across module BMIs'). It clearly separates this tool from references or document_symbols, though 'BMIs' is domain-specific and not fully explained.

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

Usage Guidelines3/5

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

The tool's general purpose is clear, and it gives a practical hint that needle is often easier for agents. However, it does not explicitly state when to prefer this tool over sibling tools such as references or workspace_symbols, and it provides no exclusionary criteria.

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

diagnosticsB

Parse a file and return clangd diagnostics after module resolution.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes

TDQS

B3.2/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the transparency burden. It reveals that module resolution happens before returning diagnostics, which is a useful process detail. However, it does not disclose potential side effects, error behavior, or whether the operation is read-only, leaving part of the behavioral contract implicit.

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

Conciseness5/5

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

The description is a single, concise sentence with no redundant words. It front-loads the core action ('Parse a file') and includes the key qualifier 'after module resolution' without digressing. Every word contributes to the meaning.

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

Completeness4/5

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

For a simple tool with one parameter and no output schema, the description covers the essential behavior and a key context point (module resolution). It does not elaborate on return format, but since no output schema exists, this is not required. The description is sufficient for an agent to understand the tool's primary function.

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

Parameters2/5

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

The schema has only a 'file' string with no description, and the description does not clarify whether 'file' refers to a path, content, or identifier. With schema coverage at 0%, the description needed to explain the parameter's semantics but only says 'a file', which adds little beyond the schema itself.

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

Purpose4/5

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

The description uses specific verbs and nouns: 'Parse a file', 'return clangd diagnostics', 'after module resolution'. It clearly conveys the tool's purpose and is distinct from siblings like 'document_symbols' or 'ast', though it does not explicitly differentiate itself. The inclusion of 'clangd' and 'module resolution' adds specificity beyond a generic statement.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives. It does not mention prerequisites, typical use cases, or when not to use it. The description is purely functional with no contextual or decision-making support for an agent.

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

document_symbolsB

List declarations in a C++ source or module unit using clangd's hierarchical symbol view.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses that the result comes from clangd's hierarchical symbol view and the operation is a read-only list, but it does not mention prerequisites such as an open/indexed file or what happens for unparseable inputs.

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

Conciseness5/5

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

The description is a single, front-loaded sentence with no filler or repetition. Every phrase adds useful information: action, scope, and method.

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

Completeness3/5

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

For a one-parameter, no-output-schema tool, this is minimally viable: it states what is returned (declarations) and the hierarchical organization. But without annotations or an output schema, it leaves gaps around return shape details and any practical constraints (e.g., requiring clangd to be ready).

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

Parameters2/5

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

Schema coverage is 0%, so the description must clarify the 'file' parameter. It adds that the file is a C++ source or module unit, but it does not specify path format, accepted extensions, or URI/absolute-path expectations, leaving much of the parameter semantics unexplained.

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

Purpose4/5

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

The description names a specific action ('List declarations') and resource ('C++ source or module unit'), and clarifies the method ('clangd's hierarchical symbol view'). It is clear enough to distinguish from workspace_symbols by scope, though it does not explicitly reference siblings.

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

Usage Guidelines3/5

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

The intended use is implied: call it when you need declarations from a single C++ source/module unit rather than workspace-wide search. However, it provides no explicit when-to-use/when-not-to-use guidance or alternative tool names.

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

formatA

Format C++/module source with clangd. Preview is the default; apply=true explicitly writes the file and updates clangd.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes
applyNo
tabSizeNo
insertSpacesNo

TDQS

A4/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden of disclosing side effects. It clearly states that preview is the default and that apply=true explicitly writes the file and updates clangd, which is critical safety information for an agent deciding whether invocation may mutate state.

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

Conciseness5/5

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

Two sentences deliver the core purpose, the engine, the default mode, and the explicit mutation mode. There is no filler or redundancy, and the most important safety detail is placed in the second sentence.

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

Completeness3/5

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

The description covers the key purpose and preview/apply distinction, which is essential for safe invocation. However, it does not explain what the preview output looks like, what happens if the file is not part of the current workspace, or how `tabSize` and `insertSpaces` affect the result, leaving noticeable gaps for a 4-parameter tool with no annotations.

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

Parameters2/5

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

The schema has no parameter descriptions and the description only explains the `apply` parameter semantics. `file` is only implied by 'source,' while `tabSize` and `insertSpaces` are not explained at all despite being meaningful formatting controls.

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

Purpose5/5

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

The description clearly states a specific action ('Format') applied to a specific resource ('C++/module source') and names the engine ('clangd'). It also distinguishes itself from the sibling workspace, module, and diagnostics tools by identifying the formatting operation.

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

Usage Guidelines4/5

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

The description provides clear guidance on default behavior versus opt-in mutation: preview by default, apply=true to write. While it does not explicitly name excluded alternatives, the sibling list contains no competing format tool, so the usage context is reasonably clear.

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

module_graphC

Resolve a module to interface units, imports, dependencies, and importing translation units.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYes
transitiveNo

TDQS

C2.7/5.0
Behavior2/5

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

No annotations are provided, so the description carries full burden. It is silent about whether this operation is read-only, whether it can be expensive or require specific permissions. For a graph resolution tool, it would be helpful to mention that it may traverse large graphs or require workspace indexing.

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

Conciseness4/5

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

The description is a single, clear sentence that is concise and gets to the point. It could be slightly more structured by mentioning parameters, but as is, it is adequately sized and not verbose.

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

Completeness2/5

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

With no output schema, no annotations, and no parameter detail, the description is insufficient for a complex graph-resolution tool. The agent cannot predict what the response contains, nor does it understand the impact of the 'transitive' flag. It needs more detail on the structure of the resolved graph and any potential side effects.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate. It does not mention the 'name' parameter meaning or how 'transitive' affects the resolution. Users have to infer from the schema that 'name' is required and 'transitive' defaults to false, but the description adds no additional meaning.

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

Purpose4/5

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

The description uses a specific verb 'Resolve' and specific resource 'module' and lists the outputs: interface units, imports, dependencies, and importing translation units. It clearly distinguishes from sibling tools like module_search and module_quality, which likely search or analyze modules rather than resolve their graph.

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

Usage Guidelines2/5

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

No guidance on when to use this tool vs alternatives. Sibling tools like module_search, module_quality, references, definitions might overlap in purpose, but the description does not clarify when to choose this tool over them. It does not mention any preconditions or consequences.

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

module_qualityA

Use clangd AST to find non-trivial definitions in module interfaces and verify matching .cpp implementation units.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileNo
concurrencyNo
minBodyLinesNo
minStatementsNo

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description carries full burden. It mentions using clangd AST and the analysis nature, but does not disclose side effects, limitations, or return format. The description is not misleading but leaves behavioral details unspecified.

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

Conciseness5/5

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

The description is a single, efficient sentence with no redundancy or filler. It clearly front-loads the core action and purpose, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description should explain what the tool returns and how to invoke it effectively. It only states what it does, not the result format, thresholds usage, or any prerequisites, leaving significant gaps for a complex analysis tool.

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

Parameters2/5

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

Schema coverage is 0% and the description provides no explanation of the four parameters (file, concurrency, minBodyLines, minStatements). Although parameter names hint at meaning, the agent gains no explicit semantic guidance, requiring inference or external knowledge.

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

Purpose5/5

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

The description uses a specific verb 'find' and 'verify' on a clear resource: module interfaces matched to .cpp implementations. It clearly distinguishes this from sibling tools like module_search or module_graph, which focus on different aspects.

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

Usage Guidelines3/5

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

The purpose implies usage for checking module definition-implementation consistency, but it does not explicitly state when to use it over alternatives or any exclusions. The context is inferable but not clearly articulated.

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

referencesB

Find indexed references to a declaration across module units and translation units.

ParametersJSON Schema
NameRequiredDescriptionDefault
fileYes
lineNo1-based line
needleNoText to locate instead of line/character
characterNo1-based UTF-16 character
occurrenceNo
includeDeclarationNo

TDQS

B3/5.0
Behavior2/5

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

With no annotations present, the description carries the full burden of behavioral disclosure but reveals little beyond the core function. The term 'indexed' hints that results depend on a pre-built index, which is useful context, but there's no mention of failure modes, permission needs, or index freshness. This is a modest but insufficient contribution given the absent annotations.

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

Conciseness5/5

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

A single 16-word sentence that front-loads the verb and object, adds a valuable scope qualifier, and contains zero filler. This is exemplary conciseness—every word earns its place.

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

Completeness2/5

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

For a 6-parameter tool with no output schema and no annotations, a 16-word description is insufficient. It doesn't clarify the 'occurrence' parameter's role (which is non-obvious for a reference finder), the default behaviors, or what the response shape looks like. Given the complexity, this is under-specified.

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

Parameters2/5

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

Schema description coverage sits at 50%—three of six parameters (file, occurrence, includeDeclaration) lack inline descriptions, and the tool description offers zero parameter clarification. The rubric's baseline of 3 for >80% coverage doesn't apply here; with half the params undocumented, the description should compensate but doesn't.

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

Purpose4/5

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

The description provides a specific verb ('Find') and resource ('indexed references to a declaration') with a meaningful scope qualifier ('across module units and translation units'). This differentiates it from siblings like 'definition' by implying cross-module reach, though it doesn't name an alternative tool explicitly as the top-tier examples do.

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

Usage Guidelines3/5

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

Usage is implied through the description's framing—an agent would know to use this when cross-unit references are needed—but there's no explicit when-to-use guidance, no exclusions, and no mention of prerequisites (e.g., an index needing to be built). This meets the 'implied usage' bar at exactly 3.

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

workspace_openA

Open a C++ workspace and start one persistent module-aware clangd process.

ParametersJSON Schema
NameRequiredDescriptionDefault
modeNocpp skips module BMI augmentation; modules enables module-aware indexingauto
rootYesAbsolute C++ workspace root
transportNonative
wslDistroNoWSL distribution when transport is wslArch
clangdPathNoclangd executable inside the selected transport
buildDirectoryYesAbsolute build directory or path relative to root containing compile_commands.json
experimentalModulesNoEnable slow clangd dependency discovery when prebuilt PCM files are unavailable

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full transparency burden. It usefully discloses the persistent clangd process and module awareness, but it does not explain idempotency, blocking behavior, failure conditions, or what happens if the workspace is already open.

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

Conciseness5/5

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

The description is a single front-loaded sentence with no filler. Every part adds meaning: the action, the target, and the key side effect.

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

Completeness3/5

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

For a stateful 7-parameter setup command with no annotations or output schema, the description plus schema is adequate but not complete. It lacks lifecycle guidance, prerequisites like compile_commands.json, and verification/return details, yet the core invocation path is clear.

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

Parameters3/5

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

Schema description coverage is high (86%), so the schema already documents most parameters. The description adds only the general 'module-aware' concept and does not explain parameter tradeoffs beyond what the schema provides; baseline 3 is appropriate.

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

Purpose5/5

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

Description uses a specific verb/resource pair ('Open a C++ workspace') and adds a distinctive behavioral outcome ('start one persistent module-aware clangd process'), clearly separating it from siblings like workspace_warm or workspace_status.

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

Usage Guidelines2/5

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

No guidance is given on when to call this versus alternatives such as workspace_status or workspace_refresh, nor whether it should be called once before other workspace commands. The implied use case is not stated explicitly.

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

workspace_refreshB

Reload compile commands and rebuilt PCM/modmap artifacts, restarting clangd without rewriting unchanged cache files.

ParametersJSON Schema
NameRequiredDescriptionDefault
reasonNomanual MCP refresh

TDQS

B3.4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses reloading, rebuilding, restarting clangd, and preserving unchanged cache files. It could mention potential disruption to open sessions, but the core side effects are clearly stated.

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

Conciseness4/5

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

The description is a single dense sentence with no filler. The 'rebuilt' phrasing is slightly awkward, but the sentence conveys multiple key behaviors efficiently.

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

Completeness3/5

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

The description is adequate for a single-action tool but leaves gaps: no usage guidance, no parameter explanation, and no indication of return or failure behavior. Given the simple schema, it is minimally viable rather than complete.

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

Parameters2/5

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

Schema description coverage is 0% and the description does not mention the optional 'reason' parameter. The schema only provides a type and default, so the description adds no semantic value beyond the schema for this parameter.

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

Purpose4/5

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

The description uses specific verbs and objects: 'Reload compile commands and rebuilt PCM/modmap artifacts, restarting clangd'. It clearly identifies the tool's primary action and scope, though it does not explicitly differentiate from sibling tools like workspace_warm.

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

Usage Guidelines3/5

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

The behavior implies use when compile commands or generated artifacts are stale and clangd needs restarting, but there is no explicit guidance on when to prefer this over sibling tools or when not to use it.

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

workspace_statusA

Return clangd readiness, warmup progress, module counts, PCM/modmap coverage, and recent errors.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. The verb 'Return' suggests a read-only operation, but it does not explicitly state that there are no side effects, nor does it describe potential latency or dependencies (e.g., whether it triggers warmup). This is adequate but not thorough.

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

Conciseness5/5

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

The description is a single sentence that is front-loaded with the main action ('Return') and lists all output categories. There is zero fluff, and every word contributes value.

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

Completeness4/5

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

The description enumerates what the agent can expect, and given the absence of an output schema, this is necessary. It lacks detailed explanations of domain terms (e.g., 'readiness', 'coverage'), but for a focused status tool in a clangd context, these are likely understood.

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

Parameters4/5

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

The tool has zero parameters, so the schema trivially covers all (100%). Per rubric, baseline for 0 params is 4, and there is no additional parameter meaning to convey.

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

Purpose5/5

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

The description explicitly states the tool returns specific status information (clangd readiness, warmup progress, module counts, PCM/modmap coverage, recent errors), which clearly distinguishes it from sibling tools like workspace_open or workspace_refresh. It uses a specific verb (Return) and a concrete resource.

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

Usage Guidelines4/5

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

The description implies its usage as a status-check tool, and the context (sibling tools being actions rather than queries) makes it clear why an agent would call it. However, it does not explicitly state when not to use it or mention alternative tools for similar purposes.

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

workspace_symbolsB

Search clangd symbols and named C++ modules in one request.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

TDQS

B3/5.0
Behavior2/5

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

No annotations are provided, so the description alone must carry transparency. It only states the search action and combined scope, without mentioning result shape, grouping, pagination, read-only behavior, or workspace-scoping constraints, which an agent would need.

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

Conciseness5/5

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

The description is a single front-loaded sentence with no filler or redundant restatement of the tool name. It could say more about behavior, but as a concise lead it earns its place.

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

Completeness2/5

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

The tool is structurally simple (one required parameter, no output schema), so the required context is small. Still, with no annotations and no return-value information, an agent cannot tell what a successful search returns or how modules are represented in results.

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

Parameters2/5

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

The schema has only a bare 'query' string at 0% description coverage; the tool description implies query is the search text for symbols/modules but adds no syntax, matching semantics, empty-query behavior, or examples. This does not compensate for the schema's silence.

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

Purpose4/5

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

The description uses a specific verb ('Search') and names concrete resources ('clangd symbols and named C++ modules'), plus the 'in one request' qualifier distinguishes it from separate module/symbol search siblings. It does not elaborate on what counts as a symbol, but the core purpose is unambiguous.

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

Usage Guidelines3/5

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

'In one request' hints that this tool is for combined symbol-and-module searches rather than using separate siblings, but it gives no explicit when-to-use/alternatives guidance. There are no exclusions or named fallback tools such as module_search.

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

workspace_warmA

Start non-blocking AST warmup. Poll workspace_status; other MCP tools remain available.

ParametersJSON Schema
NameRequiredDescriptionDefault
filesNoFiles to warm; defaults to module interfaces
limitNo

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden. It accurately discloses that the operation is non-blocking and that status should be polled, which is valuable. However, it does not explain side effects, preconditions (e.g., whether a workspace must be open), or any resource implications, leaving some behavioral aspects opaque.

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

Conciseness5/5

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

Two sentences, both essential. The first states the core action, the second gives the follow-up instruction and reassures about availability. No fluff or repetition.

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

Completeness3/5

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

Given the simple tool (no output schema, two optional params), the description covers the core start-and-poll behavior but omits important context: what 'AST warmup' involves, preconditions, the meaning of 'limit', and the exact effect on the workspace. It is adequate but not fully self-sufficient.

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

Parameters2/5

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

The description does not mention parameters at all. The schema describes 'files' but 'limit' lacks a semantic description, and overall schema coverage is only 50%. The description fails to compensate for the missing limit explanation, leaving its meaning ambiguous beyond the default/max/min constraints.

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

Purpose5/5

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

The description clearly states the tool's action: 'Start non-blocking AST warmup.' It specifies a concrete verb and resource, and the follow-up instruction 'Poll workspace_status' clarifies the intended workflow. This distinguishes it from siblings like workspace_refresh or workspace_open by emphasizing its non-blocking warmup nature.

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

Usage Guidelines4/5

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

The description provides clear context: it is non-blocking, so the agent should use workspace_status to check progress, and other MCP tools remain usable in the meantime. It does not explicitly name alternatives or exclusions, but the 'poll workspace_status' instruction effectively guides when to use this tool and what to do next.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 14 tool updatesv0.1.0
    • First observedast
    • First observeddefinition
    • First observeddiagnostics
    • First observeddocument_symbols
    • First observedformat
    • First observedmodule_graph
    • First observedmodule_quality
    • First observedmodule_search
    • First observedreferences
    • First observedworkspace_open
    • First observedworkspace_refresh
    • First observedworkspace_status
    • First observedworkspace_symbols
    • First observedworkspace_warm

TDQS

B3.4/5.0

Scored across 14 tools

Disambiguation4/5

The tools sort into recognizable groups: workspace lifecycle, module graph/quality, AST/symbol queries, navigation, and diagnostics. There is some boundary overlap between module_search and workspace_symbols, and between ast and document_symbols, but the descriptions are usually enough to steer an agent to the right tool.

Naming Consistency3/5

The naming is readable and uniformly snake_case, but is not strongly consistent: workspace_open and workspace_refresh are verb-focused, while ast, definition, references, diagnostics, module_quality, and document_symbols follow different naming styles. The workspace_* and module_* prefixes help, but there is no single predictable verb_noun pattern across the surface.

Tool Count4/5

14 tools is reasonable for a C++ module-aware clangd server covering workspace lifecycle, module graph analysis, AST inspection, formatting, navigation, and diagnostics. It is on the larger side, but each tool addresses a meaningful aspect of the domain rather than introducing pure redundancy.

Completeness4/5

The tool surface covers workspace readiness, module discovery and dependency resolution, AST/symbol queries, formatting, cross-file navigation, and diagnostics. Minor gaps include a way to close/discard a workspace and any MCP-level operation to modify module units, but these do not block core read/build/analyze workflows.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Provides C++ code intelligence tools for AI agents via the Model Context Protocol, enabling symbol navigation, type information, and diagnostics.
    9
    49
    Mozilla Public 2.0
  • F
    license
    Not graded
    quality
    D
    maintenance
    Workspace-aware MCP server that provides AI clients with structural code understanding via AST parsing, hybrid retrieval, and git history, enabling accurate code search, definition lookup, and blame analysis.
    -
  • A
    license
    A
    quality
    D
    maintenance
    MCP server for C/C++ code analysis using clangd and clang tools, providing diagnostics, symbol search, include analysis, function listing, and code formatting.
    5
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    A persistent code-intelligence MCP server that builds a queryable knowledge graph of your codebase, enabling AI assistants to perform cross-file structural reasoning, dependency analysis, and blast radius detection.
    9
    MIT