Skip to main content
Glama

read_audio

Destructive

Render a Pyxel sound or music slot to WAV and return measurable audio data, with optional inline audio content or a saved output file.

Instructions

Render one Pyxel sound or music slot to WAV and return measurable audio data. Set inline=true to return audio content (up to 4 MiB) and omit output_path if desired. Notes describe tracker fields.

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": {
      "script": "<script>",
      "target": "<target>"
    },
    "name": "read_audio"
  }
}

Input Schema

NameRequiredDescriptionDefault
inlineNo
scriptYesLocal .pyxres file or trusted Pyxel script path.
targetYes
output_pathNo

Output Schema

NameRequiredDescriptionDefault
okYes
pathNo
notesNo
errorsYes
channelsNo
warningsNo
sample_rateNo
peak_amplitudeNo
duration_secondsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.5.0
    • addedInput schema / properties / inline
      Added value: +{
      +  "default": false,
      +  "title": "Inline",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / output_path / anyOf
      Added value: +[
      +  {
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / output_path / default
      Added value: +null
    • removedInput schema / properties / output_path / minLength
      Removed value: -1
    • removedInput schema / properties / output_path / type
      Removed value: -"string"
    • addedInput schema / properties / script / description
      Added value: +"Local .pyxres file or trusted Pyxel script path."
    • changedInput schema / required
      Previous value: -[
      -  "script",
      -  "target",
      -  "output_path"
      -]New value: +[
      +  "script",
      +  "target"
      +]
  2. Addedv1.3.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, openWorldHint=true and readOnlyHint=false, so the agent knows this mutates the outside world; the description adds a useful 4 MiB inline payload cap. But it never explains what the destructive aspect actually means, e.g. whether output_path overwrites an existing file or what writing to disk entails, which is the key gap for a destructive tool.

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?

Three compact, front-loaded sentences with the main action first and the inline/output_path pairing second. The trailing clause 'Notes describe tracker fields' is vague and the weakest part, but overall there is little padding.

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?

An output schema exists so return values need no explanation, but for a destructive, open-world tool that executes a script and writes WAV files, the description omits where output lands when output_path is null, storage implications, and side effects worth flagging.

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 coverage is only 25% (only 'script' is documented), so the description must carry weight; it does clarify that target refers to one sound or music slot and that inline caps at 4 MiB and interacts with output_path. It still leaves the music-vs-sound mutual exclusivity within AudioTarget and the default destination when output_path is omitted unexplained.

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?

States a specific verb and resource: 'Render one Pyxel sound or music slot to WAV and return measurable audio data.' That is clearly distinct from the read_image/read_palette/read_tilemap retrieval siblings, though it never explicitly says how it differs from them beyond the audio resource type.

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 description gives parameter-level usage advice ('set inline=true ... omit output_path if desired') but says nothing about when to prefer this tool over siblings, what happens if neither inline nor output_path is set, or any preconditions on the script being trusted.

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