Skip to main content
Glama

execute_manim_code

Render Manim-Slides scenes from Python code and retrieve the produced media files. Automatically caches unchanged renders to save time.

Instructions

Execute Manim-Slides Python code and render the resulting scenes.

Writes the provided code to a secure temporary script, renders it with
``manim-slides render`` (headless, no preview popup), and returns the
produced media files. Rendered-frame percentages are streamed to the client
as ``notifications/progress`` updates while rendering is in progress.

Renders are cached by a content hash of ``code``, ``scenes``, and
``quality``: an unchanged request reuses the previously rendered media
instead of re-rendering.

Args:
    code: Python source code defining one or more Manim Scene/Slide classes.
    scenes: Names of the Scene/Slide classes to render. If omitted or empty,
        all scenes in the file are rendered.
    quality: Render quality: "l" (low), "m" (medium), "h" (high),
        "p" (2K), or "k" (4K). Defaults to "l".
    media_dir: Directory where rendered media is stored. Defaults to the
        ``WORKSPACE_DIR`` environment variable or a temporary directory.
    timeout: Maximum time in seconds to wait for rendering.
    use_cache: When True, reuse previously rendered media for unchanged
        requests instead of re-rendering. Defaults to True.

Returns:
    A JSON string with the render status, produced media file paths,
    executed command, and captured stdout/stderr. A cache hit sets
    ``cached`` to True and omits the command.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
scenesNo
qualityNol
timeoutNo
media_dirNo
use_cacheNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations, the description fully covers behavioral traits: writes to a secure temporary script, renders headless, streams progress notifications, caches by content hash, and returns a JSON with status, files, command, and stdout/stderr. It also explains cache hit behavior.

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 well-structured and front-loaded with the purpose, followed by behavior notes, caching details, and a clear Args list. It is detailed but not redundant, with each sentence adding necessary information.

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 tool with 6 parameters and no annotations, the description is comprehensive: it explains security, rendering mode, progress streaming, caching, timeout handling, parameter options, and the exact return format. It leaves no critical gaps, especially since an output schema exists.

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?

All six parameters are described in depth in the Args section, including defaults, allowed quality values, media_dir fallback to environment variable, timeout meaning, and use_cache semantics. This significantly exceeds the schema's basic type/default info, compensating for the 0% schema coverage.

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 description clearly states the tool 'Executes Manim-Slides Python code and renders the resulting scenes,' which is a specific verb+resource pair. It distinguishes from siblings like compile_presentation or preview_slide by focusing on execution and rendering of code.

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 provides context about headless rendering, caching, and progress updates but does not explicitly mention when to use this tool versus alternatives like preview_slide or compile_presentation. Usage is implied but not clearly contrasted with other tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/antoniomachuca/MCP-Manim-Slides'

If you have feedback or need assistance with the MCP directory API, please join our Discord server