Skip to main content
Glama

apply_operations

Applies a batch of drawing and layer operations to an Aseprite document at a specified revision, enabling atomic edits that can be undone in one step.

Instructions

在指定修订执行原子批次,一次撤销。layer={kind:id或ref,value:标识},frame默认1。 支持 create_layer(ref,name)、set_opacity(layer,opacity)、pixel(layer,x,y,rgba)、 rectangle/ellipse(layer,x,y,width,height,rgba,filled=true)、pixels(layer,points=[{x,y,rgba}])、 line(layer,x1,y1,x2,y2,rgba,thickness=1)、clear_region(layer,x,y,width,height)、 write_region(layer,x,y,width,height,encoding=rgba|rle,mode=replace|source_over, pixels=[[r,g,b,a],...]或runs=[{count,rgba},...])。区域像素按行优先,RGBA为0–255整数。

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": {
      "session_id": "<session_id>",
      "document_id": "<document_id>",
      "expected_revision": "<expected_revision>",
      "operations": "<operations>"
    },
    "name": "apply_operations"
  }
}

Input Schema

NameRequiredDescriptionDefault
operationsYes
request_idNo
session_idYes
document_idYes
expected_contextNo
expected_revisionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A3.6/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and discloses important traits: operations are atomic, a single undo reverses the batch, frame defaults to 1, layer references use kind:id or ref, and region pixels are row-major with RGBA 0-255. It does not describe revision-conflict behavior, permissions, or error responses, so it is strong but not exhaustive.

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?

The purpose and atomicity constraint are front-loaded, and the dense operation grammar is appropriate for a tool with nine operation variants. The block is somewhat run-on and would benefit from clearer formatting, but there is little wasted wording.

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?

For a complex six-parameter tool with nested operation objects and no output schema, the description covers the core operations and coordinate conventions well. It remains incomplete on identifier parameters, expected_context, request_id, and return behavior, so an agent still has gaps to infer.

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 0%, so the description must compensate. It does an excellent job documenting the complex operations array and its nested operation shapes, but it leaves session_id, document_id, request_id, and expected_context unexplained, and only indirectly gestures at expected_revision via 'specified revision.'

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 a specific verb and resource: execute an atomic batch of drawing operations against a specified revision, with one undo. It also enumerates the supported operation types, making the tool's scope clear. It does not explicitly distinguish itself from siblings such as undo or read_pixels, so it falls short of a 5.

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?

Usage is implied by 'atomic batch' and 'one undo,' which suggests this is the tool for grouped drawing edits rather than single-step undo/redo. However, there is no explicit when-to-use/when-not-to-use guidance, and no sibling alternative is named.

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