Skip to main content
Glama
AstralVoidZ
by AstralVoidZ

ppsspp_assemble

Destructive

Assemble MIPS instructions and write the encoded bytes to a specified address in PPSSPP memory. Use force to write to protected areas.

Instructions

PURPOSE: Assemble MIPS instruction(s) and write the resulting bytes to memory.

USAGE: session_id + address + code ('

' or ';' separated — PPSSPP assembles one line per call so the tool loops; armips-style ';' comments are NOT supported here).

BEHAVIOR: DESTRUCTIVE. Protected ranges (kernel, top.prx code) need force=true. A partial write is reported with an error directing you to disassemble and inspect.

RETURNS: {address, code, bytes_written, response, text}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesMIPS assembly source. May be a single instruction ('nop', 'addiu r5, r0, 0x10') or multiple instructions separated by '\n' or ';'. The assembler is PPSSPP's built-in MIPS encoder.
forceNoSet to True to write assembled bytes to protected code-section addresses (kernel memory < 0x08800000 or top.prx code section 0x08804000-0x08D34000). Writing to these ranges without force=True raises ToolError to prevent accidental crashes.
addressYesTarget address where assembled bytes will be written, as a hex string (e.g. '0x08804000'). Must be a valid MIPS-aligned address for the ISA.
session_idYesActive session ID.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesAssembly source string passed in.
textYesUnified text representation: 'Assembled N bytes → 0x{ADDR:08X}'.
addressYesTarget address, hex string (e.g. '0x08804000').
responseYesRaw PPSSPP WebSocket response.
bytes_writtenYesNumber of bytes written. Best-effort: derived from response['bytes'] length when available, else 0.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

The description explicitly labels the operation DESTRUCTIVE, matching the destructiveHint annotation, and adds concrete protection details: kernel and top.prx ranges require force=true and partial writes surface an error instructing disassembly. This goes well beyond the annotation's single boolean.

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?

Four labeled sections (PURPOSE, USAGE, BEHAVIOR, RETURNS) front-load the most important information and keep it to a compact block. No filler sentences.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with full schema coverage and an output schema, the description covers invocation, formatting, destructive behavior, protected ranges, partial-failure behavior, and return shape. The only gap is explicit sibling differentiation, which is already penalized under usage guidelines and does not make the definition incomplete for invocation.

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?

Schema coverage is 100%, so the baseline is 3; the description adds value by clarifying that code may contain newline or semicolon separators, that armips-style comments are unsupported, and that force is required for protected ranges. It does not add address/session_id semantics, but the schema already documents those.

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 opens with a specific action ('Assemble MIPS instruction(s)') and a clear resource ('write the resulting bytes to memory'). This differentiates it from ppsspp_write_memory (raw writes) and ppsspp_disassemble (reading) without requiring the agent to open the schema.

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?

The USAGE section specifies the required inputs (session_id, address, code) and code formatting ('\n' or ';' separated, no armips comments), and explains that the tool loops because PPSSPP assembles one line per call. However, it never names sibling alternatives like ppsspp_write_memory or states when to choose this over them; usage is implied rather than explicitly routed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.