Skip to main content
Glama

Set logic

editor_setLogic

Overwrite the single conditional rule on a logic element identified by nodeId. Insert separate logic elements for additional rules; delete the element to remove its rule. Referenced question, page, and field IDs are validated. Read the document first with editor_getDocument to get valid IDs. When a rule shows a question, also set isHidden:true on that question so it is hidden by default. See load_skill("logic-rules").

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formIdYesForm ID
nodeIdYesnodeId of the logic element whose rule is being overwritten (from editor_getDocument).
logicRuleYesSingle replacement rule. Insert another logic block for each additional rule.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations cover the safety profile (not read-only, not destructive, not open-world). Beyond that, the description discloses that the operation is an overwrite (so an existing rule is replaced), that referenced question/page/field IDs are validated, and that a rule targeting a question requires a companion isHidden change. That is meaningful behavioral context the annotations do not provide.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Five short sentences, front-loaded with the mutation and its target, then consequences, prerequisites, and a skill pointer. Every sentence carries distinct information; no filler.

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

Completeness4/5

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

For a mutation tool with a very complex nested schema, no output schema, and annotations supplying the safety profile, the description covers overwrite semantics, ID validation, the prerequisite read, and the isHidden companion step. It does not mention error/failure behavior or return value, but with no output schema that is a minor gap.

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 100% and the deeply nested logicRule structure is thoroughly documented in the schema itself (operators, action types, fieldRef vs literal, nesting depth cap). The description adds only that logicRule is a 'single replacement rule' — useful framing but not new parameter syntax. Baseline 3 is correct when the schema does the heavy lifting.

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?

Specific verb+resource+scope: 'Overwrite the single conditional rule on a logic element identified by nodeId.' The word 'single' and the overwrite framing distinguish it cleanly from the sibling editor_insertLogic, which the description names implicitly by telling the agent to insert separate elements for additional rules.

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

Usage Guidelines5/5

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

Explicit routing: insert separate logic elements for extra rules, delete the element to remove a rule, read the document first with editor_getDocument for valid IDs, and set isHidden:true on questions referenced by a rule. It also points to load_skill("logic-rules") for deeper guidance. Nothing about when to use vs. not use is left to inference.

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.