Skip to main content
Glama

ass_add_style

Create a new style or replace an existing style of the same name in an ASS subtitle document, validating all values before writing.

Instructions

Create a style, or replace an existing one of the same name.

Every value is stored verbatim (/48.0 becomes 48); colour values given as #RRGGBB are converted into the spelling the document already uses for that field. Values are validated before anything is written: font_size must be positive, alignment 1-9, border_style 1 or 3, margins whole numbers and colours a spelling the document can store.

overwrite=True replaces the style: every field is (re)written from the arguments, so fields left at their defaults go back to those defaults rather than keeping the old value — use ass_update_style to change a few fields and leave the rest alone. relative_to is Aegisub's style-manager setting: it is only written when the document's Format line already declares a RelativeTo column, otherwise it is listed in ignored_fields (adding the column would desynchronise the Format line).

Returns: {"doc_id", "name", "created", "style", "fields_set", "ignored_fields"}created is False when overwrite=True replaced an existing style.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
boldNo
fontNoArial
nameYes
angleNo
doc_idNo
italicNo
shadowNo
outlineNo
scale_xNo
scale_yNo
spacingNo
encodingNo
margin_lNo
margin_rNo
margin_vNo
alignmentNo
font_sizeNo
overwriteNo
underlineNo
strike_outNo
back_colourNo&H00000000&
relative_toNo
border_styleNo
outline_colourNo&H00000000&
primary_colourNo&H00FFFFFF&
secondary_colourNo&H000000FF&

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations to lean on, the description carries the full burden and delivers: verbatim storage rules ('/48.0' becomes 48), colour normalization, pre-write validation constraints (font_size positive, alignment 1-9, border_style 1 or 3), the destructive semantics of overwrite=True (fields revert to defaults), and the relative_to/Format-line 'ignored_fields' edge case.

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 core create/replace action and the overwrite distinction before the detail paragraphs. Dense and largely waste-free, though the validation and returns blocks could be tightened.

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?

Covers the hard parts an agent needs: overwrite semantics, validation, the Format-line caveat, and the return shape. With a declared output schema, the explicit return documentation is a bonus rather than a necessity, and the partial parameter coverage is the only real gap.

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% across 26 parameters, so the description must compensate. It adds real validation meaning for font_size, alignment, border_style, margins, colours, overwrite, and relative_to, but leaves the majority (bold, italic, outline, shadow, scale_x/y, spacing, encoding, angle, font, underline, strike_out) to inference from titles/defaults.

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 concrete verb+resource ('Create a style, or replace an existing one of the same name') and immediately distinguishes itself from the sibling ass_update_style. An agent knows exactly what this tool does versus its neighbors without opening any schema.

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

Usage Guidelines5/5

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

Explicitly names the alternative ('use ``ass_update_style`` to change a few fields and leave the rest alone') and gives the precise condition under which overwrite replaces versus preserves fields. This is the when/when-not/alternative pattern at its best.

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