Skip to main content
Glama
William-An

cpp-debug-mcp

by William-An

diagnose_crash_site

Combine GDB backtrace with LSP static analysis from clangd to diagnose program crashes like SIGSEGV.

Instructions

Diagnose a crash by combining GDB backtrace with LSP static analysis.

When the program has stopped (e.g., SIGSEGV), this tool gathers:

  • Full backtrace from GDB

  • Local variables at the crash frame

  • Type information at each frame from clangd

  • Static diagnostics (warnings/errors) for relevant source files

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
gdb_session_idYesActive GDB session (program must be stopped at crash).
lsp_session_idYesActive LSP session for the project.
max_framesNoMaximum backtrace frames 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 must fully disclose behavior. It details what the tool gathers (backtrace, variables, type info, diagnostics) and implies a read-only diagnostic operation. No mention of side effects, but none are expected for such a tool.

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 very concise: one sentence for purpose, then a bullet-style list of what is gathered. No wasted words, and the key information is front-loaded.

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

Completeness5/5

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

The description fully covers the tool's output (backtrace, locals, type info, static diagnostics) and context (crash situation). An output schema exists, so return values need not be elaborated. Given the tool's complexity and rich sibling context, this is complete.

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 coverage is 100%, so the input schema already provides descriptions for all three parameters. The tool description does not add new meaning beyond what is in the schema, thus baseline score of 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?

The description clearly states the tool's purpose: 'Diagnose a crash by combining GDB backtrace with LSP static analysis.' This is a specific verb and resource, and it distinguishes itself from sibling tools that handle individual debugging or analysis tasks.

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 gives a clear usage context: 'When the program has stopped (e.g., SIGSEGV).' It does not explicitly state when not to use it or name alternatives, but the sibling list provides context for other specific 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