Skip to main content
Glama

read_tilemap

Destructive

Read Pyxel tilemap tile coordinates, usage, bounds, and source bank, with an optional rendered image or bbox region selection for layout inspection.

Instructions

Read Pyxel tile coordinates, usage, bounds, source bank, and optional rendered output. bbox=[x,y,w,h] selects a region in tiles. inline=true returns the render as image content and makes render_path optional.

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

Input Schema

NameRequiredDescriptionDefault
bboxNo
inlineNo
scriptYesLocal .pyxres file or trusted Pyxel script path.
tilemapYes
render_pathNo

Output Schema

NameRequiredDescriptionDefault
okYes
sizeNo
tilesNo
usageNo
errorsYes
imgsrcNo
regionNo
renderedNo
tilemap_indexNo
sampled_regionNo
zero_tile_usedNo
zero_tile_nonemptyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.5.0
    • addedInput schema / properties / bbox
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maxItems": 4,
      +      "minItems": 4,
      +      "prefixItems": [
      +        {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        {
      +          "exclusiveMinimum": 0,
      +          "type": "integer"
      +        },
      +        {
      +          "exclusiveMinimum": 0,
      +          "type": "integer"
      +        }
      +      ],
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Bbox"
      +}
    • addedInput schema / properties / script / description
      Added value: +"Local .pyxres file or trusted Pyxel script path."
    • addedOutput schema / properties / sampled_region
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/Region"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Addedv1.3.0

TDQS

B3.4/5.0
Behavior2/5

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

Annotations declare readOnlyHint=false, destructiveHint=true, and openWorldHint=true, so the agent already knows this is not a safe pure read. The description, however, frames the operation purely as 'Read' and never discloses that the script is executed or that render_path writes a file to disk — the very reasons the destructive hint is set. It adds the inline/render_path relationship but omits the side-effect context that matters most here.

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 dense sentences with zero filler; the capability statement leads and the two parameter-behavior rules follow. Every clause conveys operative information.

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?

Output schema exists, so return values need not be described. The remaining gaps are behavioral: nothing explains the side effects implied by destructiveHint=true (script execution, file writing via render_path) or what permissions/trust the 'trusted Pyxel script path' requires. For a 5-parameter tool with mutation potential, that is an incomplete picture.

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?

With only 20% schema coverage, the description carries real weight: it defines the bbox ordering as [x,y,w,h] in tile units (the schema only says 'array of 4 integers') and explains that inline=true makes render_path optional, which the schema's flat defaults do not convey. script and tilemap are left to the schema, but the value added on the three ambiguous parameters is substantial.

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 Pyxel tile coordinates, usage, bounds, source bank, and optional rendered output' — which enumerates exactly what is returned. It is clearly distinct from read_image, read_audio, and read_palette by naming the tilemap domain, though it never explicitly contrasts itself with those siblings.

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?

Guidance is limited to parameter-level behavior: 'bbox=[x,y,w,h] selects a region in tiles' and the interplay between inline and render_path. There is no statement of when to reach for this tool versus read_image or diff_frames, nor any prerequisites for the script argument.

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