Skip to main content
Glama

gdb_get_variables

Retrieve local variables for a specific stack frame and thread in a GDB session. Provide session ID from gdb_start_session; optionally specify thread ID and frame number.

Instructions

Get local variables for a specific stack frame in a thread. Requires session_id parameter (obtained from gdb_start_session).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idYesSession ID from gdb_start_session
thread_idNoThread ID (None for current)
frameNoFrame number (0 is current)
Behavior3/5

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

No annotations are provided, so the description must disclose behavior. It implies a read-only operation ("get") but does not explicitly state that no state is modified, nor does it mention potential error conditions (e.g., invalid session). For a simple getter, this is adequate but not rich.

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 concise sentences with zero unnecessary words. The essential information is front-loaded: the action and the key prerequisite.

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 explains the tool's purpose and a prerequisite, but lacks details about the return format (e.g., list of variable names/values) or error scenarios. Given no output schema, the agent may need more context to interpret results.

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% with all parameters described. The description reinforces that session_id comes from gdb_start_session, but adds no new semantics for thread_id or frame beyond what the schema already provides. Baseline 3 is appropriate.

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 clearly states the verb "Get" and resource "local variables" with context "for a specific stack frame in a thread", distinguishing it from sibling tools like gdb_get_backtrace (stack trace) and gdb_get_registers (registers). It is specific and unambiguous.

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 mentions a prerequisite (session_id from gdb_start_session) but provides no guidance on when to use this tool versus alternatives, nor any exclusions or recommended context.

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/airfloats/gdb_mcp'

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