Skip to main content
Glama

gc_memory_write_struct

Pack values with a Python struct format and write the resulting bytes to GameCube memory; returns the number of bytes written.

Instructions

Pack values with a Python struct format and write them to memory.

fmt is a Python :mod:struct format string (see gc_memory_read_struct for the byte-order notes). values is a list of the values to pack, in format order, e.g. for ">12f" pass 12 floats.

Returns the number of bytes written.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "instance_id": "<instance_id>",
      "address": "<address>",
      "fmt": "<fmt>",
      "values": "<values>"
    },
    "name": "gc_memory_write_struct"
  }
}

Input Schema

NameRequiredDescriptionDefault
fmtYes
valuesYes
addressYes
instance_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does disclose the return value ('number of bytes written') and the packing semantics, but says nothing about mutation impact, required instance state, or what happens on a format/value mismatch or invalid address.

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 core action is front-loaded in the first sentence, and the format/values explanation plus return note are compact. RST markup and the parenthetical cross-reference are minor overhead but not wasteful.

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 4-parameter mutation tool with no annotations and no output schema, disclosing the byte-count return value helps. However, the two infrastructure parameters (address, instance_id) are undocumented anywhere, leaving an agent to infer their meaning and valid ranges.

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

Parameters3/5

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

Schema description coverage is 0%, so the description should compensate for all four parameters. It meaningfully explains fmt and values (with a concrete example and format ordering), but leaves address and instance_id completely undefined, so it only partially fills the gap.

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 gives a specific verb and resource: pack values per a Python struct format and write them to memory. The contrast with the raw-byte sibling gc_memory_write is implicit in 'pack with struct' and the cross-reference to gc_memory_read_struct, so an agent can distinguish them. It stops short of explicitly stating 'use this instead of gc_memory_write when you have typed values'.

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?

Usage is implied by the worked example ('for ">12f" pass 12 floats') and the pointer to gc_memory_read_struct for byte-order notes, but there is no explicit when-to-use versus gc_memory_write guidance, no prerequisites such as having an attached instance, and no exclusions.

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