Skip to main content
Glama
William-An

cpp-debug-mcp

by William-An

analyze_function

Sets a temporary breakpoint on a C++ function, then uses clangd to get its signature and references and GDB to retrieve local variables.

Instructions

Analyze a function using both GDB and LSP.

Sets a temporary breakpoint at the function, gets its signature and references from clangd, and retrieves local variables if the program is stopped there.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gdb_session_idYesActive GDB session.
lsp_session_idYesActive LSP session for the project.
function_nameYesName of the function to analyze.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden. It details the steps: sets temporary breakpoint, gets signature and references, retrieves local variables if stopped. It doesn't clarify if the breakpoint is automatically removed or mention error handling, but overall it provides a clear behavioral overview.

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 with front-loaded purpose. The first sentence states what the tool does, the second breaks down the steps. No redundant information.

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 complexity (combining GDB and LSP), the description covers key behaviors. With an output schema expected to detail return values, it is reasonably complete, though it could mention prerequisites like active sessions.

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 descriptions for all three parameters are clear and sufficient. The description does not add extra parameter-specific information beyond what the schema already provides, achieving baseline given 100% 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 'Analyze a function using both GDB and LSP,' specifying the integration of debugging and language server tools. It distinguishes from sibling tools that handle GDB or LSP individually by combining both.

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 explains the tool's actions (sets breakpoint, gets signature and references, retrieves local variables), implying its use case for comprehensive function analysis. However, it does not explicitly state when not to use it or mention alternatives like calling individual 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/William-An/cpp-debug-mcp'

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