Skip to main content
Glama

ass_karaoke_template

Expand a karaoke template line into one generated ASS subtitle line per syllable, substituting $syl and $sdur while copying override tags verbatim.

Instructions

Expand a karaoke template line into one generated line per syllable.

This is a documented subset of the Aegisub karaoke templater. Only $syl (the syllable text) and $sdur (the syllable duration in centiseconds) are substituted; the template's other override tags (including \t transforms) are copied verbatim into every generated line. Classes, code/once/mixin lines, the rest of the variable set and the effect library are not supported — see unsupported in the result.

Arguments

selection the lines whose syllables are expanded. template_line / template_index the template: a raw string, or a 0-based line index. With a real template index the generated lines are inserted directly after it and copy its Layer, Actor, Effect, kind, style and margins; with a raw string they are appended after the last selected line. style style for the generated lines (default: the template's style, else the Karaoke style). mode how to split the target line when it has no karaoke tags yet (marker / char / word / regex). replace_existing remove previously generated lines (same Effect marker) that sit immediately after the template line before inserting. create_styles create the standard karaoke styles when style names one that does not exist yet. dry_run report the lines that would be generated without inserting.

Returns

{"doc_id", "template_subset": True, "subset_of_aegisub_karaoke_templater": True, "supported": [...], "unsupported": [...], "variables_used": [...], "unknown_variables": [...], "template": {...}, "dry_run", "inserted_count": n, "replaced_lines": n, "generated": [{"target_index", "syllable_index", "text", "syllable", "duration_cs", "start_ms", "end_ms", "start", "end", "layer", "actor", "style", "kind", "inserted_index"}], "generated_indices": [...]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNomarker
styleNo
doc_idNo
dry_runNo
selectionYes
create_stylesNo
template_lineNo
template_indexNo
replace_existingNo

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 does so well: it explains that generated lines inherit Layer/Actor/Effect/kind/style/margins when a template index is used, that raw-string templates are appended after the last selected line, what replace_existing removes, and that create_styles may create styles. This is rich behavioral context beyond a bare 'expand' claim, though permissions/undo behavior is unaddressed.

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 definition is long but organized with clear Arguments and Returns sections and the core purpose front-loaded. The Returns block is verbose for a 10% dimension, but since there is no output schema it earns most of its space; a few lines could still be trimmed.

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 9-parameter mutation tool with no annotations and no output schema, the description covers the operation, the supported/unsupported subset, every meaningful argument, and a full return-shape listing. An agent has everything needed to call it correctly and interpret the result.

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%, so the description must compensate, and it does: it documents selection, template_line/template_index (including the behavioral difference between them), style defaulting rules, mode, replace_existing, create_styles, and dry_run. It even enumerates the mode values (marker/char/word/regex) that the schema leaves unspecified, adding genuine meaning over the raw schema.

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 opening sentence gives a precise verb+resource: 'Expand a karaoke template line into one generated line per syllable.' An agent immediately understands the transformation. However, it never distinguishes itself from the closely named sibling ass_karaoke_generate, so sibling differentiation is missing.

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 description scopes what is and is not supported (only $syl/$sdur; no classes, code/once/mixin, effect library), which implicitly tells the agent when this tool is the right choice. But it never states when to prefer it over ass_karaoke_generate or any other karaoke sibling, and gives no prerequisites. Usage is implied rather than guided.

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