Skip to main content
Glama

update_slice

Move or resize a sprite slice, or set its 9-slice center and pivot while leaving other fields unchanged; centers that do not fit the new bounds are rejected.

Instructions

Move or resize a slice, or set its 9-slice centre or pivot; other fields stay.

A centre that no longer fits the new rect is an error.

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": {
      "path": "<path>",
      "name": "<name>"
    },
    "name": "update_slice"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesSlice name
pathYesSprite file. Relative paths resolve against the server root.
rectNoNew bounds in canvas pixels
pivotNoPivot point relative to the slice's top-left
centerNo9-slice centre, relative to the slice's top-left; must fit inside it

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden. It does disclose partial-update semantics and one failure mode (a centre that no longer fits the new rect is an error), which is genuine value, but it says nothing about what happens when the path or slice name is unknown, whether the change is persisted or undoable, or any permission requirements for a mutating tool.

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 short sentences, no waste, with the action and the partial-update constraint front-loaded and the validation error second. Nothing could be cut without losing information.

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

Completeness4/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 not be explained, and the schema fully documents the five parameters. What remains thin for a mutation tool with zero annotations is failure behavior for missing sprites/slices and persistence expectations, though the core contract is adequately conveyed.

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 100%, including descriptions for rect, pivot and center, so the baseline is 3. The description adds the coupling rule that centre and rect are validated against each other, but does not explain the -1-style sentinel or how omitted (null) fields are treated beyond 'other fields stay'.

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 states specific verbs (move, resize, set) against a specific resource (a slice), plus which sub-fields are touched (centre, pivot). That is enough to distinguish it from create_slice/delete_slice by implication, but no sibling is named or contrasted explicitly.

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?

'other fields stay' implies this is a partial update rather than a replace, which hints at when to reach for it over create_slice. There is no explicit when-to-use/when-not guidance and no mention of prerequisites such as the slice having to already exist.

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