Skip to main content
Glama
SongJiangzhou

C++ Style Guide MCP Server

check_include_guard

Verify C++ header file include guards for correctness by analyzing code and suggesting proper macro names based on file paths.

Instructions

检查 C++ 头文件的包含保护是否正确

参数:
    code: 头文件的完整代码
    file_path: 可选的文件路径,用于生成建议的保护宏名

返回:
    检查结果,包含是否符合规范、详细说明和建议

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
file_pathNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 of behavioral disclosure. It describes what the tool does (checks include guard correctness) and what it returns (results with compliance details, explanations, and suggestions), but doesn't mention performance characteristics, error handling, or specific implementation details that would help an agent understand behavioral traits beyond basic functionality.

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 appropriately sized and front-loaded with the main purpose first, followed by parameter and return sections. Every sentence adds value, though the structure could be slightly more polished (e.g., using bullet points or clearer formatting).

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?

Given the tool's moderate complexity (2 parameters, no annotations, but with output schema), the description is reasonably complete. It explains the purpose, parameters, and return value, and since an output schema exists, it doesn't need to detail return structure. However, it could benefit from more context on error cases or edge scenarios.

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?

With 0% schema description coverage, the description compensates well by explaining both parameters: 'code' as the complete header file code and 'file_path' as an optional path for generating suggested guard macro names. This adds meaningful context beyond the bare schema, though it doesn't detail format requirements or examples.

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 specific action ('检查' meaning 'check') and resource ('C++ 头文件的包含保护' meaning 'C++ header file include guard'), distinguishing it from sibling tools like analyze_memory_safety or check_naming by focusing on include guard validation rather than memory safety or naming conventions.

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 C++ header files, but doesn't explicitly state when to use this tool versus alternatives like check_const_correctness or suggest_modern_cpp. It provides basic context but lacks explicit guidance on exclusions or comparisons with sibling tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SongJiangzhou/cpp_guidelines'

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