Skip to main content
Glama

read_palette

Destructive

Retrieves the active Pyxel palette and image-bank palette indices from a .pyxres file or trusted Pyxel script, so you can inspect color and index mappings.

Instructions

Read the active Pyxel palette and the palette indices used by image banks.

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>"
    },
    "name": "read_palette"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYesLocal .pyxres file or trusted Pyxel script path.

Output Schema

NameRequiredDescriptionDefault
okYes
colorsNo
errorsYes
palette_sizeNo
used_indicesNo
extended_paletteNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.5.0
    • addedInput schema / properties / script / description
      Added value: +"Local .pyxres file or trusted Pyxel script path."
  2. Addedv1.3.0

TDQS

C2.7/5.0
Behavior1/5

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

The annotations declare readOnlyHint=false, destructiveHint=true and openWorldHint=true, but the description frames everything as a passive read of an "active palette." Nothing explains that supplying a Pyxel script path can execute code or that the call may have side effects, which is precisely the behavior the annotations warn about. For a tool flagged destructive, this silence turns the mild verb "read" into a misleading safety signal.

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?

One tight sentence, front-loaded with the verb and resource, with no filler. The efficiency is real but it comes partly at the cost of disclosure, so it does not reach a 5.

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

Completeness2/5

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

The output schema covers the return value and the single parameter is fully documented in the schema, so those needs are met. However, the definition leaves the destructiveHint/openWorldHint profile entirely unreconciled: an agent cannot learn from the description that a script may be executed or that results depend on external files. That gap is material for a tool with these annotations.

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 100%, and the single `script` parameter is documented there as "Local .pyxres file or trusted Pyxel script path." The description adds nothing about that parameter, so it neither helps nor hurts. Under the high-coverage baseline, a 3 is correct.

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 opens with a specific verb and resource ("Read the active Pyxel palette") and adds scope beyond the name: it also returns "the palette indices used by image banks." That distinguishes it in substance from read_image / read_tilemap. It stops short of naming any sibling, so it is clear but not differentiated by explicit reference.

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

Usage Guidelines2/5

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

There is no statement of when to reach for this tool versus read_image, read_tilemap, or pyxel_info, and no prerequisites. The only quasi-guidance is the schema string "trusted Pyxel script path," which lives in the schema rather than the description. An agent must infer the use case from the name and from the fact that a palette underlies image banks.

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