Read and author animations
godot_animationRead, create, and edit Godot AnimationPlayer animations directly in .tscn or .tres files without opening Godot; inspect keyframes, tracks, loops, and write changes with undo.
Instructions
The animations of an AnimationPlayer, read from and written to the scene file (or an Animation .tres); no Godot needed. op read: every animation with length, loop mode and tracks, keyframes as time -> value. op create: a new animation (the library is made when the player has none). op add_track: a value track (path such as Sprite2D:position) or a method track with keys [{time, value | method + args, transition?}]. op set_key / remove_key: one keyframe of a track. op remove_track, op remove (an animation), op set (length, loop_mode, step). The track path must name a node that exists in the scene and a property its class has; otherwise the nearest name is given. Dry run by default; write: true writes, and godot_undo takes it back.
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": {
"scene": "<scene>",
"op": "<op>"
},
"name": "godot_animation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | what to do | |
| args | No | set_key on a method track: its arguments | |
| keys | No | add_track: the keyframes; a value is Godot text such as "Vector2(10, 0)" or a number | |
| name | No | create: the new animation's name | |
| path | No | add_track: node and property, e.g. "Sprite2D:position"; for a method track the node | |
| step | No | create or set: the snap step in seconds | |
| time | No | set_key, remove_key: the keyframe's time | |
| type | No | add_track: the track type (default value) | |
| scene | Yes | the .tscn or .tres file (res:// path, or relative to the project) | |
| track | No | set_key, remove_key, remove_track: the track index | |
| value | No | set_key: the value (Godot text or a number) | |
| write | No | write the change (default false: show it) | |
| interp | No | add_track: interpolation (0 nearest, 1 linear, 2 cubic) | |
| length | No | create or set: length in seconds | |
| method | No | set_key on a method track: the method | |
| player | No | path of the AnimationPlayer in the scene (default: the only one) | |
| update | No | add_track: update mode (0 continuous, 1 discrete, 2 capture) | |
| library | No | the animation library name (default "") | |
| animation | No | the animation's name (read: only this one) | |
| loop_mode | No | create or set: how it loops | |
| loop_wrap | No | add_track: wrap interpolation at the loop | |
| transition | No | set_key: the easing (default 1) |