Skip to main content
Glama

add_custom_code

Inject custom Python code into a Manim scene's construct method to implement advanced animations not covered by other tools.

Instructions

Inject custom Python code into the scene script.

The code will be inserted inside the construct() method body. Use this for advanced manim functionality not covered by other tools.

IMPORTANT: Always use MCP tools for scene operations. Do NOT write or execute standalone manim scripts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
code_snippetYesValid Python code to insert in the scene's construct().

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

Without annotations, the description carries the full burden. It discloses the core mutation behavior: injects code into the scene script, specifically into construct(). However, it does not disclose potential side effects (e.g., invalid code causing rendering errors), execution details, or reversibility. The 'inserted inside construct()' detail is useful, but the description could be more explicit about the impact on the scene and error handling.

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 description is compact with five sentences, each contributing: purpose, insertion detail, usage context, and a warning about not using standalone scripts. It is front-loaded with the main action, and the 'IMPORTANT' note is appropriately highlighted. No filler. Slightly longer than the ideal two-sentence description, but the extra content is justified.

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?

Despite no annotations, the description covers the essential behavioral context for a simple one-parameter tool: what it does, where the code goes, and when to use it. The presence of an output schema means return-value documentation is not required. The arbitrary code nature could warrant more cautionary detail, but the description provides enough for correct selection and invocation. It could mention error handling, but the parameter is self-describing and usage guidance is clear.

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?

The schema description for code_snippet already explains it's 'Valid Python code to insert in the scene's construct().' Since schema coverage is 100%, the baseline is 3. The description adds context about advanced functionality but doesn't introduce new parameter-level semantics beyond the schema; it reinforces that the code is custom and advanced, but not additional detail about format or constraints.

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 uses a specific verb 'inject' with the resource 'custom Python code into the scene script' and clarifies the insertion point (construct() method body). It also distinguishes from sibling tools by explicitly stating it's for 'advanced manim functionality not covered by other tools,' positioning it as a fallback for unsupported operations.

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

Usage Guidelines4/5

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

The description explicitly states when to use: 'Use this for advanced manim functionality not covered by other tools.' This implies that for functionality covered by dedicated tools, those should be used instead. The 'IMPORTANT' note directs the agent to always use MCP tools and avoid standalone manim scripts, providing clear behavioral guardrails, though no specific alternative tool names are given.

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/daedalus/mcp-manimgl'

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