Skip to main content
Glama

Insert variable

editor_insertVariable

Insert a variable reference inline to display a field value in text (answer piping). Works with hidden fields, calculated fields, and question input fields. Use in paragraphs and headers to show dynamic values like recipient names, scores, totals, or piped answers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formIdYesForm ID
nodeIdYesID of the text node to insert the variable reference into (e.g., "p1", "h1")
offsetYesCharacter position to insert at. Use -1 to append at end. Each existing inline element (variable, link) counts as ONE position, not its display label length. Prefer 0 / -1 when the target paragraph already has inlines.
fieldIdYesID of the field to reference — can be a hidden field (e.g., "hf1"), a calculated field (e.g., "cf1"), or a question input field (e.g., "ti1") for answer piping
fieldNameYesDisplay name for the variable reference

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and openWorldHint=false, so the mutation-but-not-destructive profile is covered. The description adds the field-type compatibility (hidden, calculated, question inputs) but nothing about what insertion changes, offset edge cases, or failure behavior.

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?

Three tight sentences with the core action front-loaded and the usage examples last. Every sentence contributes; 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 5-required-param mutation tool with a fully documented schema and no output schema, the description covers purpose, field compatibility, and usage sites well. It is only missing return/error behavior, which is minor given the schema depth.

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%, including the tricky offset semantics and examples for nodeId/fieldId, so the schema carries the load. The description repeats the field-type constraint (hidden/calculated/question) but adds no syntax or format detail beyond the schema.

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 states a specific verb (insert) and resource (variable reference inline), and clarifies the intent is answer piping. It implicitly separates itself from siblings like editor_insertHiddenField or editor_insertCalculatedField by saying it references existing fields rather than creating them, though it never names those siblings explicitly.

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?

"Use in paragraphs and headers to show dynamic values like recipient names, scores, totals, or piped answers" gives clear contextual guidance for when to reach for this tool. There is no explicit when-not or named alternative, but the use case is unambiguous.

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.