Skip to main content
Glama

ass_style_for_line

Resolve the effective style for an ASS subtitle line by applying inline override tags, revealing the font, size, color, and alignment libass actually uses.

Instructions

Effective style values for one line, inline override tags included.

The line's Style field is resolved to a style; on top of it the inline override tags that change font, size, colour, weight, scale, spacing, border, shadow or alignment are applied, so the caller sees what libass would actually use. \r/\rStyle restarts from a (possibly other) style, exactly as the renderer does.

Args: index: 0-based line index in doc.events() order (comments included). None uses the session selection (ass_select), falling back to its first index. doc_id: document id or None for the current document.

Returns: {"doc_id", "index", "style", "style_found", "style_definition", "resolved", "runs", "overrides", "transforms", "warnings", "text", "plain_text"}. resolved is the typed effective state at the first visible character; runs splits the visible text into {start, end, values, sources, style} spans with identical values; overrides lists the field names that inline tags modified; transforms lists the \t(...) tags (animation is reported, not folded into the numbers); colours stay in the spelling the tag/style used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.2/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 does well: it explains the resolution semantics, that \r/\rStyle restart from a style exactly as the renderer does, that transforms are reported rather than folded into numbers, and that colours keep their original spelling. The read-only nature is strongly implied but never stated outright, which keeps it from a 5.

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?

Well front-loaded with the purpose sentence first, then resolution details, then structured Args/Returns. The Returns list is long, and since an output schema exists it partly restates structured data, but the semantic explanation of resolved/runs/overrides adds real value rather than pure duplication.

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 moderately complex read tool with an output schema, the description covers resolution mechanics, fallback behavior, and field semantics thoroughly. Minor remaining gaps are the absence of an explicit read-only statement and any routing hint against near-neighbor siblings, but nothing an agent needs to invoke it correctly is missing.

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 coverage is 0%, so the description must compensate fully. It does: index is documented as 0-based in doc.events() order with comments included, None falls back to the session selection and then its first index; doc_id accepts an id or None for the current document. Both parameters are fully specified with fallback semantics.

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+resource: resolving the effective style for one line, including inline override tags, so the caller sees what libass would actually use. This clearly distinguishes it from siblings like ass_get_style (raw style definition) or ass_get_line (raw line data), which an agent can tell apart without opening schemas.

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 strongly implied by the stated behavior ('what libass would actually use'), and the index fallback to session selection gives practical context. However, it never explicitly names when to prefer this over ass_get_line, ass_get_style, or ass_tag_summary, and gives no explicit when-not guidance.

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