Skip to main content
Glama

ass_add_attachment

Attach a font or image file to an ASS subtitle document as a base64-encoded attachment, with optional name and document ID.

Instructions

Attach a file to the document, base64-encoded, like Aegisub's attach menu.

Args: path: file to attach (read from disk; the only filesystem input of this module besides the workspace itself). doc_id: document id or None for the current document. name: name stored in the document; defaults to the file's basename. kind: "font" or "image"; inferred from the magic bytes, falling back to the file extension, when omitted.

Returns: {"doc_id", "name", "kind", "section", "path", "bytes", "base64_lines", "sniff", "replaced"}. An attachment with the same name in the same section is replaced (replaced is True).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindNo
nameNo
pathYes
doc_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden and does so thoroughly: it discloses base64 encoding, filesystem reads from path, defaulting rules for doc_id and name, kind inference via magic bytes with extension fallback, and replacement semantics when an attachment with the same name exists in the same section. It also lists the return fields, including the replaced flag.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core action, then organized into Args and Returns sections. Every sentence adds useful information, and there is no redundant or filler content.

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?

Given the absence of annotations, four parameters with 0% schema description coverage, and an output schema, the description is complete enough to invoke the tool correctly. It documents parameter defaults, file handling, inference behavior, return structure, and replacement behavior.

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: each of the four parameters is explained with meaning beyond the bare schema. It clarifies that path is read from disk, doc_id None selects the current document, name defaults to the file's basename, and kind accepts 'font' or 'image' with inference behavior when omitted.

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?

The first sentence states a specific verb and resource: 'Attach a file to the document, base64-encoded.' This distinguishes the tool from sibling attachment operations like ass_remove_attachment, ass_list_attachments, and ass_extract_attachment without ambiguity.

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

Usage Guidelines2/5

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

The description explains what the tool does but gives no explicit guidance on when to use it instead of alternatives such as ass_extract_attachment or ass_remove_attachment. The analogy to Aegisub's attach menu provides context but does not specify use conditions or exclusions.

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