Skip to main content
Glama

列出局部变量

gdb_list_locals
Read-onlyIdempotent

List local variables and their values in the current stack frame to inspect program state during debugging.

Instructions

列出当前栈帧的局部变量及其值。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

Annotations already indicate a safe, idempotent read operation. The description adds no further behavioral details such as effect on state or error conditions, but this is acceptable given the simple nature of the 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?

Single sentence, no unnecessary words, perfectly concise and directly addresses the tool's function.

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?

Adequate description for a simple list tool without output schema. Could be improved by specifying the return format (e.g., names and values), but it's complete enough for an agent to understand the purpose.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters in the schema, so the description doesn't need to explain any. A baseline score of 4 is appropriate for zero-parameter tools.

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 it lists local variables and their values of the current stack frame. This distinguishes it from sibling tools like gdb_list_arguments and gdb_list_registers, which list different scopes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage when needing local variables of the current stack frame, but lacks explicit guidance on when to use this versus alternatives or prerequisites like selecting a frame.

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/zjm1060/gdb-mcp'

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