Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

switch_break_at

Set a breakpoint at a specific offset relative to the main executable's base address for debugging Nintendo Switch applications in gdb-multiarch.

Instructions

Set a breakpoint at an offset relative to the base of main ($main). Example: offset '0x3a5f10' sets a breakpoint at $main+0x3a5f10.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
offsetYesOffset into main executable (hex, e.g. '0x3a5f10' or '3a5f10')

Implementation Reference

  • The handler logic for 'switch_break_at' in the `call_tool` function. It parses the 'OffsetArgs' input and executes the GDB command 'break_at' using the current session.
    elif name == "switch_break_at":
        a = OffsetArgs(**arguments)
        result = session.execute_command(f"break_at {a.offset}")
  • The Pydantic model 'OffsetArgs' defines the expected input schema for 'switch_break_at'.
    class OffsetArgs(BaseModel):
        offset: str = Field(
            ...,
            description="Offset into main executable (hex, e.g. '0x3a5f10' or '3a5f10')",
        )
  • Registration of the 'switch_break_at' tool in the `list_tools` function.
    Tool(
        name="switch_break_at",
        description=(
            "Set a breakpoint at an offset relative to the base of main ($main). "
            "Example: offset '0x3a5f10' sets a breakpoint at $main+0x3a5f10."
        ),
        inputSchema=OffsetArgs.model_json_schema(),
    ),
Behavior3/5

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

With no annotations provided, the description must carry the full behavioral burden. It successfully explains the relative addressing calculation, but omits side effects (e.g., overwriting existing breakpoints at the same location), error handling, or session persistence details that would help an agent predict outcomes.

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 sentences with zero waste: first states the operation and addressing model, second provides a concrete example. The information is front-loaded and the example directly supports the parameter semantics.

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?

For a single-parameter mutation tool without output schema, the description adequately covers the primary function and parameter interpretation. Minor gap in not describing failure modes or return behavior, but acceptable given the tool's constrained scope.

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?

While the schema has 100% coverage describing the offset format, the description adds crucial semantic context that the offset is calculated 'relative to the base of main ($main)' rather than being an absolute address or file offset, clarifying the addressing model beyond the schema's 'into main executable'.

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 uses a specific verb ('Set') with clear resource ('breakpoint') and scope ('relative to the base of main'). It effectively distinguishes itself from the sibling 'gdb_set_breakpoint' by specifying the offset-relative-to-main addressing mode, which is a critical semantic difference.

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

Usage Guidelines4/5

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

Provides a concrete example ('0x3a5f10') that clarifies input format and the arithmetic ($main+offset). However, it lacks explicit guidance on when to choose this over 'gdb_set_breakpoint' or error conditions (e.g., invalid offsets).

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