Skip to main content
Part of the scene-scripting skill. The skill links here when your agent needs the detail.
The second and later tiers of the ctx object that summer_run_script hands to func run(ctx):. The core tier (creation helpers, find, save_scene, summary) is in the scene-scripting skill. Call results from ctx are untyped: write var wall = ctx.add_mesh(...), never var wall := ... (GDScript cannot infer a type from an untyped call and refuses to compile).

The geometry & authoring stdlib (geometry tier)

Newer engines extend ctx with a second tier: real geometry (booleans, lathe, sweep, terrain), mesh post-processing (smooth, decimate, UVs, mirror, collision), keyframe animation, and text shaders. Frozen signatures:
Conventions, same as the rest of the stdlib: creation helpers set the owner and return the created node; bad input produces a per-helper report entry plus a null/false return, never a crash; every baked mesh carries generated normals (and tangents where UVs exist). On an older engine these helpers are missing — the CSG-node fallback recipe in recipes-3d.md (next to this file) still works everywhere.

The animation stdlib (animation tier)

Character-animation USAGE on top of animate() — state machines, method tracks, bone poses, head tracking. Same conventions. Frozen signatures:
Blend shapes key through plain animate() with property "blend_shapes/<name>" (value tracks) — no separate helper. The end-to-end recipe (inspect an imported rig’s real clips/bones, locomotion wiring, footstep method tracks, root motion, the raw-GDScript fallback for engines without these helpers) lives in character-animation-wiring — one hop, not duplicated here.

The game-completeness stdlib (game-completeness tier: 2D, UI, gameplay code)

Everything a script needs to produce a GAME, not just a 3D scene: 2D levels, Control trees, persisted signal connections, attached scripts, prefabs, project settings. Same conventions (owner-by-default, return the node, prop_warnings, structured report entries on failure — never silent). 2D helpers work in any edited scene (root may be Node2D or Node); Control helpers parent under the edited root unless a parent is given. Frozen signatures:
Engine posture. Read before relying on any of this. The game-completeness tier is a frozen contract that not every engine build exposes yet; treat it with the same preview posture as summer_run_script itself (which returns engine_lacks_op on engines without RunSceneScript). On an engine that has RunSceneScript but predates this tier, a missing helper is a plain GDScript error (Invalid call to method 'add_ui'…) and, under the default undo: "action", the whole run rolls back. Fall back to what works everywhere: Undo posture. File-writing helpers (attach_script, make_prefab) and project-settings helpers (add_autoload, add_input_action, set_main_scene) are covered by the pre-run checkpoint, NOT by the packed-scene undo action — a rolled_back: true result has reverted the scene but not those files or settings. The result’s undo_action note says so whenever any of them ran (files_written: [paths], project_settings_changed: [keys]): read it, and surface no_rewind_point: true to the user before more work of this kind.

Pitfalls


Source: library/skills/scene-scripting/references/ctx-api.md, rendered from summer-engine@4.3.0 on npm.