Skip to main content
Glama
sbergeron42

gdb-multiarch-mcp

by sbergeron42

switch_no_op

Replace an instruction with a NOP at a specified offset from main to disable code execution during debugging of Nintendo Switch executables.

Instructions

NOP the instruction at the given offset from main. Writes ARM64 NOP (0xD503201F) at $main+offset.

Input Schema

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

Implementation Reference

  • The handler for the 'switch_no_op' tool, which executes the 'no_op' command on the gdb session.
    elif name == "switch_no_op":
        a = OffsetArgs(**arguments)
        result = session.execute_command(f"no_op {a.offset}")
  • The registration of the 'switch_no_op' tool in the MCP server.
    Tool(
        name="switch_no_op",
        description=(
            "NOP the instruction at the given offset from main. "
            "Writes ARM64 NOP (0xD503201F) at $main+offset."
        ),
        inputSchema=OffsetArgs.model_json_schema(),
    ),
Behavior4/5

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

With no annotations provided, the description carries the full burden and effectively discloses the write operation ('Writes'), the exact bytes being written (0xD503201F), and the architecture (ARM64). However, it omits mention of side effects like cache flushing, permission requirements, or reversibility.

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: the first states the high-level operation, the second provides the specific behavioral implementation detail (ARM64 hex value). Perfectly front-loaded and appropriately sized for the tool's complexity.

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 operation specifics. It could be improved by explicitly noting this is a destructive memory write (since no annotations indicate this), but the verb 'Writes' provides sufficient disclosure for the domain.

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?

Although the schema has 100% coverage describing the offset format, the description adds crucial semantic context that the offset is relative to 'main' ('from main', '$main+offset'), clarifying the base address calculation not explicit in the parameter schema alone.

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 ('NOP') and identifies the exact resource being modified (instruction at offset from main). It distinguishes from siblings like switch_replace (arbitrary replacement) and switch_break_at by specifying the ARM64 NOP operation.

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?

While the specificity of 'NOP' implies usage (disabling instructions), there is no explicit guidance on when to choose this over switch_replace or switch_stub, nor are prerequisites like an active debugging session mentioned despite the presence of switch_start_session in siblings.

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