Skip to main content
Glama

ass_get_drawing

Inspect drawing data from an ASS subtitle line or raw drawing string. Returns parsed commands, bounding box, size, center, path length, and point counts.

Instructions

Inspect the drawing part of a line, or a raw drawing string.

Pass exactly one of:

  • index + doc_id -- the line at that 0-based index (doc.events() order) is split with tags.drawing_parts and its drawing is inspected;

  • text -- either a full override line (anything containing { or a \p tag, split the same way) or bare drawing path data.

scale is the \p level in effect for the drawing, so the returned commands, bbox, size, centre and path length are all in that scale space (units as written in the file); multiply by 2 ** (1 - scale) for script pixels. normalised_* mirrors of the bbox/size are provided already converted.

Returns a dict with source ("line" or "text"), doc_id, index, drawing (the raw drawing text), scale, has_drawing, commands (list of {kind, args, points, text}), bbox, normalised_bbox, size, normalised_size, center (aliased as centre), subpath_count, point_count, path_length, svg_path and clips (see :func:ass_get_clips for that shape).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
indexNo
doc_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden, and it does disclose non-obvious behavior: the returned commands, bbox, size, centre and path length are all in scale space (units as written in the file), with the explicit conversion factor 2 ** (1 - scale). It stops short of stating read-only/side-effect status explicitly, relying on 'Inspect' to imply it.

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-loaded with the two input modes, then the scale caveat, then the return shape; the bulleted structure is easy to scan. The enumeration of every return dict key is somewhat verbose given an output schema exists, which keeps it from a 5.

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 read-only inspection tool with three optional params and an output schema present, the description covers everything an agent needs: modality selection, the scale-space semantics that would otherwise cause silent unit errors, and the aliasing of center/centre. Return values are additionally backed by the output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the schema only gives bare titles, so the description must compensate — and it does. It defines exactly what index + doc_id mean (line at that 0-based index in doc.events() order, split with tags.drawing_parts) and what text accepts (a full override line containing '{' or a \p tag, or bare drawing path data), plus the 'exactly one' constraint.

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?

Specific verb ('inspect') plus resource ('drawing part of a line, or a raw drawing string') that clearly identifies it as a read/extract operation on drawing data. It does not, however, name or differentiate itself from close siblings such as ass_drawing_info, ass_drawing_bbox or ass_drawing_to_svg, so an agent must still infer the boundary.

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?

The mutual-exclusion rule for the two input modes (index+doc_id vs text) is spelled out clearly, which is real usage guidance. But there is no when-to-use / when-not-to-use framing relative to alternatives (e.g. ass_get_line, ass_drawing_info), so selection among siblings is only implied.

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