Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

gdb_get_registers

Retrieve current CPU register values for debugging Nintendo Switch executables in gdb-multiarch environments.

Instructions

Get CPU register values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The `get_registers` method in the `GDBSession` class executes the GDB/MI `-data-list-register-values x` command to retrieve CPU register values.
    def get_registers(self) -> dict[str, Any]:
        """Get register values for current frame."""
        result = self.execute_command("-data-list-register-values x")
    
        if result["status"] == "error":
            return result
    
        mi_result = self._extract_mi_result(result) or {}
        registers = mi_result.get("register-values", [])
    
        return {"status": "success", "registers": registers}
  • Registration of the 'gdb_get_registers' tool in the MCP server.
        name="gdb_get_registers",
        description="Get CPU register values.",
        inputSchema=NO_ARGS_SCHEMA,
    ),
  • Dispatch logic for the 'gdb_get_registers' tool in the MCP server.
    elif name == "gdb_get_registers":
        result = session.get_registers()
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. It fails to indicate that this is a read-only operation, does not describe the return format (object, array, or string), and omits that results are for the currently selected thread/frame.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely brief and front-loaded. While efficient, it is arguably too terse given the absence of annotations and output schema, leaving critical behavioral context undocumented.

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?

For a zero-parameter inspection tool, the description adequately identifies the core function but lacks necessary contextual details such as output structure, thread/frame scoping, and execution prerequisites (stopped state) that an AI agent needs to use the tool effectively.

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?

The tool accepts zero parameters, which establishes a baseline score of 4. No additional parameter context is required or provided.

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 provides a clear verb ('Get') and specific resource ('CPU register values'), distinguishing it from siblings like gdb_get_backtrace or gdb_get_variables. However, it does not explicitly differentiate from switch_get_pc or specify which register set is returned (general purpose vs. all).

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?

No guidance is provided on when to use this tool versus alternatives like gdb_evaluate_expression (to read specific registers) or switch_get_pc. There are no prerequisites stated, such as requiring the target to be stopped.

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

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