Skip to main content
Glama

ass_transform_drawing

Transform ASS subtitle vector

Instructions

Transform a drawing and return the new path data (or write it back).

Coordinates in and out are the drawing's own scale-space units (see the module docstring); results are serialised with integer coordinates.

action and the parameters it uses:

translate dx, dy -- shift every point. scale factor about (origin_x, origin_y); the origin defaults to the drawing's bbox centre so it stays put. scale_to_size dx, dy = target width/height; uniform scale (aspect ratio kept), drawing moved into (0,0,w,h). stretch_to_bbox dx, dy = target width/height; independent axes (aspect ratio deliberately broken). rotate angle_deg clockwise on screen about the origin (bbox centre by default). mirror axis="x" flips left/right, axis="y" top/bottom about the origin (bbox centre by default). center/centre_at_origin move the bbox centre to (origin_x, origin_y), default (0, 0). reverse reverse the winding of every subpath. flatten replace Bézier/B-spline curves with polylines. simplify Douglas-Peucker with tolerance factor (default 1.0). round snap coordinates to the nearest multiple of factor (factor=1.0 = integers, the default).

in_place=True with index writes the result back into the line (after workspace.snapshot) and returns the new line text; otherwise no document is touched and drawing holds the new path data.

Returns {source, doc_id, index, action, drawing, bbox, size, center, centre, changed, written} (centre duplicates center).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dxNo
dyNo
axisNox
textNo
indexNo
actionNotranslate
doc_idNo
factorNo
in_placeNo
origin_xNo
origin_yNo
angle_degNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations present, the description carries the full burden and does well: it discloses that in_place=True writes back after a workspace.snapshot (an implicit undo checkpoint) and that otherwise no document is touched. It also explains the coordinate space and integer serialization of results. It stops short of stating auth/permission or rate-limit behavior, but for a local document tool that gap is minor.

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?

Front-loads the one-sentence purpose, then uses a clean action-to-parameter mapping that is scannable despite the length. Length is justified by 12 actions and 12 parameters, though the return-shape sentence and the ``centre`` duplication note add some low-value bulk.

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?

For a 12-parameter tool with no annotations, the description covers the operation set, coordinate space, serialization, in-place write semantics, and even return fields (redundant with the output schema). The main missing piece is how the source drawing (``text``/``doc_id`` vs current selection) is supplied, which an agent still has to guess.

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?

Schema description coverage is 0% across 12 parameters, so the description must compensate, and it largely does by tying dx, dy, factor, origin_x/origin_y, axis, angle_deg, index, and in_place to concrete behaviors (e.g. factor default 1.0 for simplify/round, origin defaulting to bbox centre). It leaves ``text`` and ``doc_id`` unexplained, so the input-source mechanism for the drawing itself remains unclear.

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?

States a specific verb and resource ('Transform a drawing') and then enumerates every supported operation (translate, scale, rotate, mirror, reverse, flatten, simplify, round, etc.), so an agent can determine exactly what the tool is capable of. The general-purpose transform role is distinguishable from narrower siblings like ass_scale_drawing or ass_drawing_bbox.

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

Usage Guidelines4/5

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

Provides strong per-action context by mapping each ``action`` value to the parameters it consumes, which tells the agent how to drive the tool. It does not, however, name alternatives or state when a sibling such as ass_scale_drawing or ass_set_drawing should be preferred, so routing between overlapping tools is left to inference.

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