add_object_interaction
RECOMMENDED INTERACTION RULE: Adds a reactive interaction rule to an object (When trigger → Do action). Wire user triggers (Click, Hover, Drag, etc.) directly to Play Animation, Set Input, or Toggle Boolean without resorting to static visual effects.
add_object_interaction is an official Exode MCP tool that allows AI coding assistants like Claude Code, Cursor, and Windsurf to recommended interaction rule: adds a reactive interaction rule to an object (when trigger → do action). wire user triggers (click, hover, drag, etc.) directly to play animation, set input, or toggle boolean without resorting to static visual effects.. It directly inspects and modifies local .exode JSON files with precision without manual UI tweaking.
Example Prompt for Claude Code & Cursor
Give this instruction to your AI coding agent to execute this tool on your active .exode workspace:
"Use add_object_interaction to configure the motion properties in my active .exode workspace"Tool Parameters & Input Schema
| Parameter | Type | Required | Description |
|---|---|---|---|
| action | string | Optional | Action to perform |
| conditions | array | Optional | Optional conditions |
| delayValue | number | Optional | Delay in ms (for On Delay trigger) |
| easingCurve | string | Optional | Easing for transitions |
| id | string | Optional | Optional custom ID |
| inputValue | string | Optional | Value for Set Input action |
| intervalValue | number | Optional | Interval in ms (for On Interval trigger) |
| navigateUrl | string | Optional | URL for Navigate URL |
| objectId | string | Yes | The objectId parameter for add_object_interaction. |
| path | string | Yes | The path parameter for add_object_interaction. |
| playMode | string | Optional | Play mode for animations |
| subAnimationIds | array | Optional | Object IDs for custom animation play |
| targetAnimationId | string | Optional | Animation ID for Play/Stop/Pause |
| targetArtboard | string | Optional | Artboard name for Navigate Artboard |
| targetInputId | string | Optional | Input/variable name for Set Input / Toggle Boolean |
| targetState | string | Optional | State ID for Switch to State |
| transitionDuration | number | Optional | Transition duration in ms |
| triggerLogic | string | Optional | Logic when multiple triggers (default: OR) |
| triggers | array | Optional | Trigger events (default: ['Click']) |
More State Machines & Logic Tools
Build & Review Motion Visually
Let Claude or Cursor run add_object_interaction, then fine-tune timing, spring physics, and export ready-to-ship code in ExodeUI.