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.
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": {
"code_snippet": "<code_snippet>"
},
"name": "add_custom_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code_snippet | Yes | Valid Python code to insert in the scene's construct(). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |