选择栈帧
gdb_select_frameSelect a stack frame by its number to inspect local variables in that layer.
Instructions
选择指定编号的栈帧,用于查看该层的局部变量。
参数:
frameId: 栈帧编号 (从0开始,0为当前帧)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| frameId | Yes | Frame number to select |
gdb_select_frameSelect a stack frame by its number to inspect local variables in that layer.
选择指定编号的栈帧,用于查看该层的局部变量。
参数:
frameId: 栈帧编号 (从0开始,0为当前帧)
| Name | Required | Description | Default |
|---|---|---|---|
| frameId | Yes | Frame number to select |
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide idempotentHint=true and destructiveHint=false, so the agent knows it's safe and idempotent. The description adds that it selects a frame for viewing locals, but does not disclose that it changes the debugger's current frame state. With annotations covering the safety profile, the description adds minimal extra behavioral context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise: two sentences plus a parameter line with no waste. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the single required parameter, no output schema, and the simple operation, the description is fully complete. It explains what the tool does, what the parameter means, and the 0-based indexing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, but the description adds the crucial detail that frameId is 0-based and that 0 refers to the current frame. This provides meaning beyond the schema's 'Frame number to select'.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (select a stack frame) and its purpose (view local variables). It distinguishes from siblings like gdb_list_frames (lists frames) and gdb_list_locals (lists locals) by specifying that it selects a frame for inspection. The verb 'select' and resource 'stack frame' are precise.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly indicates use after listing frames (via gdb_list_frames) and then selecting one to inspect locals. There is no explicit 'when not to use' or comparison to alternatives, but the context is clear enough for an agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/zjm1060/gdb-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server