Skip to main content
Glama

Save animation

save_animation

Saves a rendered SVG or PNG animation to the server output directory and returns its local path for upload, after previews have been reviewed.

Instructions

Save a rendered animation to the server output directory and return its local path.

IMPORTANT: Use this only AFTER iterating on the design with render_animation's preview/filmstrip images. Do not save on the first render.

Input: pass EITHER artifact (id from render_animation, e.g. "art-1" — preferred, no SVG resend) OR content (raw SVG string).

Output file: --<6hex>.<svg|png> inside ANIM_OUTPUT_DIR (/app). The absolute path is returned; pass it unchanged to the wiki upload tool (mediawiki-mcp upload-file).

Safety: this build always rejects unsafe SVG (script, event handlers, external href/url targets, CSS @import) and names the offending element path.

Format: 'svg' (default — the wiki serves it natively, CSS/SMIL animation preserved) or 'png' (raster still).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "save_animation"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFile-name slug for the animation, e.g. 'bouncing-ball' or 'glycolysis'.
widthNoFor png: render width in pixels; defaults to the SVG's declared width.
formatNo'svg' saves the animation as text (default); 'png' renders a raster still.svg
contentNoRaw SVG to save. Only needed when the content did not come from render_animation.
artifactNoArtifact id returned by render_animation (e.g. "art-1"). Preferred over content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does most of it: it declares the write target (ANIM_OUTPUT_DIR /app), the generated filename pattern with UTC stamp and hex suffix, the returned absolute path, and a hard safety rejection of unsafe SVG features with the offending element path reported. It does not cover overwrite/duplicate-name behavior or any size limits, which keeps it off 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.

Conciseness5/5

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

Front-loaded with the one-line purpose, then bolded labeled sections (Input, Output file, Safety, Format) that make scanning trivial. Every sentence adds information an agent would otherwise have to guess.

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 no-output-schema, five-parameter mutation tool, the description covers the downstream handoff (pass the returned path unchanged to mediawiki-mcp upload-file), failure semantics, and format trade-offs. Nothing essential to correct invocation is missing.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds real meaning: artifact is preferred over content precisely because it avoids resending SVG, and format choice is explained functionally (svg preserves CSS/SMIL animation and is served natively; png is a raster still).

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 ("Save a rendered animation to the server output directory") plus the concrete effect (returns local path). It is clearly distinguishable from render_animation, which is named as the producing step rather than the saving step.

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?

Explicit sequencing guidance: "Use this only AFTER iterating on the design with render_animation's preview/filmstrip images. Do not save on the first render." It also gives selection guidance between the two input modes (artifact preferred, no SVG resend).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.