Skip to main content
Glama

Add a motion piece

add_motion

Adds one ready-made motion piece to the site, like its Ready-made tile in Xodia's Motion panel, in the site's own colours and editable there. Use it before writing motion code by hand: the pieces are vetted (lazy loading, still posters, pause controls, reduced motion, budgets) and Xodia's checks trust them. Attribute pieces (text-reveal, magnetic-button, tilt-card, spotlight-card, number-ticker) take file and line: the element whose opening tag starts on that line gets the Motion panel's attributes, no files or packages. Element pieces (scroll-story, marquee, image-trail, shader-background, hero-3d, product-3d) go next to or inside the element on line (position "before", "after" (default) or "inside"), or with page (a page's address, "/about") at the end of that page; Xodia writes the motion kit's files once (keeping kit files the owner changed) and the exact packages, package.json last (Xodia updates the lockfile). page-transition is site-wide: no place. Heavy pieces (shader-background, hero-3d, product-3d) are one a page, load after the page shows and paint a still picture first. hero-3d is React only; product-3d needs a model, hero-3d may use one: pass its Assets path from list_motion as options.model. The owner uploads the model (.glb or .gltf) in Assets: Xodia compresses it and makes its still picture. Never compress, convert or write a model file yourself. Options per piece: text-reveal: split "words" (default), "lines" or "letters"; stagger ms between parts, 0 to 300. scroll-story: steps 2 to 8 (default 4); side "left" or "right" (default right), where the pinned picture sits. marquee: seconds for one loop, 10 to 120 (default 40); direction "left" (default) or "right"; pauseOnHover true (default) or false. magnetic-button: strength 0.2 to 3 (default 1). tilt-card: strength 0.2 to 3 (default 1). spotlight-card: colour "theme" (default, the site's colours). number-ticker: to (the number, required); from (default 0); prefix and suffix up to 8 characters each; duration ms 300 to 5000. image-trail: images: 3 to 12 picture paths from Assets (required); spacing rem 2 to 16 (default 6). page-transition: style "fade" (default) or "slide"; duration ms 100 to 1000 (default 300). shader-background: shader "mesh-gradient" (default), "grain-gradient", "warp", "swirl" or "dithering"; colours "theme" (default) or 2 to 6 colours; speed 0.25 to 4 (default 0.5); stillOnSlowDevices true (default). hero-3d: shape "blob" (default), "torus-knot", "sphere", "rings" or "model" with model (an Assets path from list_motion); colours "theme" or 2 to 6 colours; autoRotate true (default); speed 0.25 to 4 (default 1); stillOnSlowDevices true (default). product-3d: model (an Assets path from list_motion, required); alt (what the model shows, required); autoRotate true (default); controls true (default, visitors turn and zoom it); ar false (default); stillOnSlowDevices true (default). Saved at once like every edit. Afterwards run run_check kind "typecheck" and kind "design", and take_screenshot of the page with frames, then frames { reducedMotion: true }, then for a heavy piece frames { weakDevice: true }. Refusals say why in plain words and what to do; Xodia AI's Fast mode adds attribute pieces only.

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": {
      "piece": "<piece>",
      "projectId": "<projectId>"
    },
    "name": "add_motion"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoThe page or section file (.tsx, .jsx or .html) with the element, relative to the project root
lineNoThe line where the element's opening tag starts, as read_file numbers lines. Attribute pieces go on it; element pieces next to or inside it
pageNoElement pieces: a page's address ("/about") to put it at the end of that page, instead of file and line
pieceYesThe piece to add: text-reveal (Text reveal), scroll-story (Scroll story), marquee (Moving strip), magnetic-button (Magnetic button), tilt-card (Tilt card), spotlight-card (Spotlight card), number-ticker (Number count), image-trail (Picture trail), page-transition (Page transition), shader-background (Moving background, heavy), hero-3d (3D hero object, heavy), product-3d (Product 3D view, heavy)
branchNoOptional branch; default the branch the workspace has open
optionsNoThe piece's settings, defaults filled in (see the tool's description per piece). A 3D model is options.model: its Assets path from list_motion
positionNoElement pieces: "before" or "after" the element (default after), or "inside" it as its last child
projectIdYesProject id from list_projects

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare write/non-destructive/non-open-world; the description goes far beyond that, disclosing that the motion kit's files are written once and owner-edited kit files are preserved, that packages plus package.json are written last with the lockfile updated, that edits save immediately, and that heavy pieces defer loading until after paint with a still poster. It also specifies the required follow-up verification sequence (run_check typecheck and design, then screenshots with frames, reducedMotion, and weakDevice variants) and the model-handling rule that Xodia compresses .glb/.gltf and the agent must never write a model file itself.

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?

It is front-loaded: purpose first, then the use-before-hand-coding rule, then reference detail, then the post-edit verification checklist. Nearly every clause carries operational information that is not available elsewhere, given that options is an untyped object. However, the per-piece options are delivered as one long chain of semicolon-separated run-on sentences, which hurts scanability for a reader who only needs one piece.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 12 enum variants, a nested free-form options object and no output schema, the description covers everything an agent needs: placement rules per class, per-piece option ranges and defaults, hard constraints (React only, model required, one heavy piece per page), failure behavior (refusals explain why and what to do), and the required post-call verification. Nothing material is left to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, so the baseline would be 3, but the description adds substantial meaning: file/line semantics differ by piece class (attribute pieces attach to the element whose opening tag starts on that line; element pieces sit before/after/inside or at the end of a page address), position's default is restated with intent, and every per-piece option is documented with ranges, enums and defaults that the free-form 'options' object cannot express in schema.

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 opening sentence names a specific verb and resource ('Adds one ready-made motion piece to the site') and grounds it in a concrete mental model ('like its Ready-made tile in Xodia's Motion panel'). It immediately distinguishes itself from manual work ('Use it before writing motion code by hand') and further splits the 12 pieces into attribute, element and site-wide categories, so an agent knows exactly what class of operation this is.

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?

It gives a clear routing rule ('Use it before writing motion code by hand'), explains why the pieces are preferable (vetted for lazy loading, posters, pause controls, reduced motion), and states limits ('Heavy pieces ... are one a page', 'hero-3d is React only', Fast mode adds attribute pieces only). What it lacks is an explicit pointer to a sibling for cases this tool does not cover, such as composing a section by hand via add_block.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources