Skip to main content
Glama
signal-slot

MCP GDB Server

by signal-slot

gdb_next

Step over function calls in a GDB debugging session to continue execution without entering nested functions. Adjust settings to step by instructions or source lines for precise debugging control.

Instructions

Step over function calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instructionsNoStep by instructions instead of source lines (optional)
sessionIdYesGDB session ID

Implementation Reference

  • Main handler function that implements the gdb_next tool logic. Checks for active GDB session, determines 'next' or 'nexti' command based on instructions flag, executes via executeGdbCommand helper, and formats response with output.
    private async handleGdbNext(args: any) {
      const { sessionId, instructions = false } = args;
      
      if (!activeSessions.has(sessionId)) {
        return {
          content: [
            {
              type: 'text',
              text: `No active GDB session with ID: ${sessionId}`
            }
          ],
          isError: true
        };
      }
      
      const session = activeSessions.get(sessionId)!;
      
      try {
        // Use nexti for instruction-level stepping, otherwise next
        const command = instructions ? "nexti" : "next";
        const output = await this.executeGdbCommand(session, command);
        
        return {
          content: [
            {
              type: 'text',
              text: `Stepped over ${instructions ? 'instruction' : 'function call'}\n\nOutput:\n${output}`
            }
          ]
        };
      } catch (error) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        return {
          content: [
            {
              type: 'text',
              text: `Failed to step over: ${errorMessage}`
            }
          ],
          isError: true
        };
      }
    }
  • src/index.ts:237-254 (registration)
    Tool registration in the ListToolsRequestSchema handler, defining name, description, and input schema for 'gdb_next'.
    {
      name: 'gdb_next',
      description: 'Step over function calls',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: {
            type: 'string',
            description: 'GDB session ID'
          },
          instructions: {
            type: 'boolean',
            description: 'Step by instructions instead of source lines (optional)'
          }
        },
        required: ['sessionId']
      }
    },
  • src/index.ts:379-380 (registration)
    Dispatch registration in the CallToolRequestSchema switch statement, routing 'gdb_next' tool calls to the handleGdbNext method.
    case 'gdb_next':
      return await this.handleGdbNext(request.params.arguments);
  • Input schema for the gdb_next tool, defining required sessionId and optional instructions boolean.
    inputSchema: {
      type: 'object',
      properties: {
        sessionId: {
          type: 'string',
          description: 'GDB session ID'
        },
        instructions: {
          type: 'boolean',
          description: 'Step by instructions instead of source lines (optional)'
        }
      },
      required: ['sessionId']
Behavior2/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. 'Step over function calls' implies a debugging operation that advances execution but doesn't enter function bodies, which is useful context. However, it lacks critical details like whether this requires a paused debug session, what happens if no function call is present, or what the expected output/state change is. For a debugging tool with zero annotation coverage, this is a significant gap.

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 phrase ('Step over function calls') with zero wasted words. It's appropriately sized for a simple debugging operation and immediately conveys the core functionality without unnecessary elaboration.

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 complexity of debugging operations, no annotations, and no output schema, the description is incomplete. It doesn't explain what 'step over' means in practical terms, what the tool returns (e.g., next line info, register state), or error conditions. For a tool that modifies debugger state, this leaves too many unknowns for reliable agent use.

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 100%, so the schema fully documents both parameters (sessionId and instructions). The description adds no parameter-specific information beyond what's in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description, which applies here.

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 'Step over function calls' clearly states the tool's action (step over) and target (function calls), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'gdb_step' (which likely steps into functions) or 'gdb_continue' (which continues execution), missing full sibling differentiation.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose 'gdb_next' over 'gdb_step' or 'gdb_continue', nor does it specify prerequisites like requiring an active debugging session. This leaves the agent with insufficient context for proper tool selection.

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

Related 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/signal-slot/mcp-gdb'

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