{"ok":true,"site":{"host":"usepopkorn.dev","url":"https://usepopkorn.dev/","type":"live","desc":"A text format for vector animation that you or an AI can write. Import SVG and Lottie, play it natively on web and mobile, or export to Lottie, GIF or MP4.","tools":[{"name":"get_outline","kind":"answer","impl":"imperative","description":"Scene map: every top-level rule with its selector/at-rule header, line range, and a one-line summary. Start here to learn the scene without reading the whole source.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"read_rules","kind":"answer","impl":"imperative","description":"Read the verbatim, line-numbered source of named top-level rules. Selectors must match outline headers exactly (e.g. \"#ball\", \"@keyframes spin\").","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"selectors":{"type":"array","items":{"type":"string"},"description":"Top-level rule headers to read, exactly as shown in the outline."}},"required":["selectors"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"read_lines","kind":"answer","impl":"imperative","description":"Read a 1-indexed inclusive line range (line-numbered), clamped to the file and capped at 400 lines.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"start":{"type":"number","description":"First line (1-indexed)."},"end":{"type":"number","description":"Last line (inclusive)."}},"required":["start","end"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"search","kind":"answer","impl":"imperative","description":"Find matching lines (with 2 lines of context each side). Plain substring by default; set isRegex to treat the query as a JS regex.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"query":{"type":"string","description":"Text or regex to find."},"isRegex":{"type":"boolean","description":"Treat query as a regex."}},"required":["query"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"read_docs","kind":"answer","impl":"imperative","description":"Read sections of the full Popkorn reference, verbatim. Pass every section you need in one call, by number from the index (\"12\") or title (\"@keyframes\"). With no sections, returns the core authoring guide.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"sections":{"type":"array","items":{"type":"string"},"description":"Section numbers or titles, e.g. [\"8\", \"12\"]."}},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"read_example","kind":"answer","impl":"imperative","description":"Read a curated gallery scene demonstrating idiomatic Popkorn. Call with no name to list every example with a one-line summary of the features it demonstrates — pick by that summary, since one scene often covers several features. Use as a syntax/capability reference when unsure how to express a feature — not as a template: never copy an example's subject, palette, or caption text into a new scene.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"name":{"type":"string","description":"Example name to read, exactly as listed by a no-argument call. Omit to list."}},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"apply_edit","kind":"act","impl":"imperative","description":"Replace an exact run of text in the scene. By default `search` must match the CURRENT scene verbatim and occur exactly once. Set replace_all to replace EVERY occurrence (needs ≥1 match) — use it for a repeated literal like a color across a palette swap. The result is parse-validated and only committed if it parses; it reports new diagnostics and moved nodes. Copy `search` from source you have seen.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"search":{"type":"string","description":"Exact text to replace."},"replace":{"type":"string","description":"Replacement text."},"replace_all":{"type":"boolean","description":"Replace every occurrence of `search` instead of requiring a single unique match."}},"required":["search","replace"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"rewrite_scene","kind":"act","impl":"imperative","description":"Replace the entire scene with new CSS. Parse-validated; only committed if it parses; reports diagnostics. Use for from-scratch scenes, not small edits.","annotations":{"readOnlyHint":false},"inputSchema":{"type":"object","properties":{"css":{"type":"string","description":"The complete new scene source."}},"required":["css"],"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]},{"name":"render_frames","kind":"act","impl":"imperative","description":"Render the live scene paused at chosen times and return one contact-sheet image: frames left-to-right, top-to-bottom, each labelled with its time, transparent stage areas shown as a checkerboard. Call it after rewrite_scene and after any motion or layout edit, then fix what you see. Pick times at the poses that matter (rest, each motion extreme, a reveal, the loop seam) rather than even spacing; omit `times` for 6 evenly spaced frames over one loop.","annotations":{"readOnlyHint":true},"inputSchema":{"type":"object","properties":{"times":{"type":"array","items":{"type":"number"},"description":"Seconds into the timeline, up to 12 frames."},"width":{"type":"number","description":"Frame width in px, 160–480 (default 320)."}},"additionalProperties":false},"hasHandler":true,"hasExecute":true,"__source":"spec","executable":true,"handlerField":"execute","page":"/","pages":["/"]}],"category":"Developer Tools","favicon":"/favicons/usepopkorn.dev.svg","apiSurface":"spec","toolCount":9}}