Skip to main content
Glama

validate_asset_against_spec

Read-only

Checks whether a built sprite matches its spec's structural declarations: canvas size, layer names, frame count, tag and slice names, and palette capacity, reporting any mismatch.

Instructions

Does a built sprite actually match the spec it was built from.

The loop closer. `validate_asset_spec` asks whether a document is well formed and
`plan_asset_spec` asks what it would do; this asks the question that bites, which is
whether the artifact and the declaration agree.

That gap is where this project's worst bugs have lived. A figure shipped with no
keyline at all because the outline was drawn onto an empty layer, and every count in
the result reported success. Three ramps clipped to pure black and beat their own
outline while passing every check that existed. Nothing was comparing what was asked
for against what arrived.

**Structure only, like `build_asset_from_spec`:** canvas size, layer names, frame
count, tag names, slice names and palette capacity. The spec layer declares no pixels,
so this verifies no pixels; `assess_sprite` is where the drawing itself is judged.

Args:
    filename: The sprite to check. Defaults to the spec's own ``<name>.aseprite``,
        which is what `build_asset_from_spec` would have written.

Returns `ok`, the list of fields `checked`, and a `mismatches` list naming the
declared value, the observed one and what the difference means. `verifiable` is false
when the spec declares nothing this can check, so an empty result is never mistaken
for a passing one.

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": {
      "spec": "<spec>"
    },
    "name": "validate_asset_against_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
specYes
filenameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true and openWorldHint=false; the description adds substantial context beyond them. It enumerates exactly what is compared (canvas size, layer names, frame count, tag names, slice names, palette capacity), explains the verifiable=false flag so an empty result is never mistaken for a pass, and documents the default filename resolution.

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?

Purpose is front-loaded, then alternatives, then scope, then args and returns: a clean progression. The two bug anecdotes (the missing keyline, the black-clipped ramps) are vivid motivation but are the most expendable prose in an otherwise procedural definition.

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 two-parameter read-only comparison tool with no output schema, the description covers return values (ok, checked list, mismatches with declared/observed/difference meaning, verifiable), scope boundaries, and default behavior. Nothing needed to call it correctly is missing.

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 0% across two parameters, so the description carries the load. It explains the filename parameter well, including the default of the spec's own <name>.aseprite path, and implies the spec object's role as the declaration being compared. However, the nested spec object (additionalProperties, no schema docs) is never described structurally, leaving the agent to infer its shape.

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 opening line states a specific verb and resource: it compares a built sprite against the spec it was built from. It goes further and positions itself against three named siblings (validate_asset_spec for document well-formedness, plan_asset_spec for intent, assess_sprite for pixel quality), so an agent can route without opening any schema.

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

Usage Guidelines5/5

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

Usage is spelled out as an explicit contrast set: validate_asset_spec asks whether the document is well formed, plan_asset_spec asks what it would do, and this asks whether artifact and declaration agree. It also states when not to reach for it, deferring pixel judgments to assess_sprite, and notes the structural scope matches build_asset_from_spec.

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

Deploy Server

Other Tools