Skip to main content
Glama

add_rule

Add a conditional rule to the ARC world engine, specifying a trigger and effect code to control actor behavior with boolean logic.

Instructions

Attach actor ECE code. Use actor.value predicates and frame N effects.

condition_code supports and/or, for example: actor.visible == true and (actor.color == 8 or action.id == 6). ACTION6 coordinates are action.x and action.y. Effects use one operation per line, for example frame 0: actor.recolor(8) followed by frame 1: actor.rotate_to(actor_2, 1, -1). Invalid code is rejected with an agent-facing line/column error. Legacy structured fields remain accepted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNo
nameYes
everyNo
phaseNo
actionNo
effectYes
triggerYes
priorityNo
conditionsNo
effect_keyNo
effect_codeNo
condition_keyNo
custom_effectNo
condition_codeNo
owner_actor_idNo
condition_logicNoall
condition_valueNo
source_actor_idNo
target_actor_idNo
collision_actor_idNo
condition_operatorNonone

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description must carry the behavioral burden. It discloses two useful behaviors: invalid code is rejected with line/column errors, and legacy structured fields are still accepted. However, it does not mention whether the tool mutates state, whether there are side effects, or any permission requirements. Given the lack of annotations, this is a partial disclosure.

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?

The description is about 100 words, front-loaded with the core purpose and then providing examples and error handling. Each sentence contributes unique information: syntax, examples, and error/rejection behavior. It is structured well with code blocks, though slightly dense.

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

Completeness3/5

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

The tool has 21 parameters, three required, and no annotations. The description covers the core code-based usage and error behavior, and mentions legacy fields, but does not explain the overall context of rules (e.g., trigger/effect relationship, execution order, or how owner_actor_id and target_actor_id work). Given the complexity and lack of annotation support, the description is not fully complete, though it provides a solid starting point.

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

Parameters3/5

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

Schema description coverage is 0%, so the description is the only source of parameter meaning. It effectively explains condition_code and effect_code with syntax examples, and hints at 'action' with ACTION6 coordinates. However, many legacy parameters (owner_actor_id, source_actor_id, condition_operator, etc.) are not explained. The description adds value but does not fully compensate for the low schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with 'Attach actor ECE code', clearly identifying the tool's verb and resource. This distinguishes it from sibling tools like add_collision_effect or add_timer_effect, which target specific effect types. However, the term 'ECE code' is somewhat technical and may require prior context to fully understand.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides concrete usage patterns through examples of condition_code and effect_code syntax. It implies this is the modern approach ('Legacy structured fields remain accepted'), but does not explicitly state when to choose this over sibling tools or when not to use it. No alternative tools are mentioned.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/junxiangyang0707-hash/arc-agi-3-world-model-lab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server