Skip to main content
Glama

Insert calculated field

editor_insertCalculatedField

Insert a calculated field for scoring, counters, and computed runtime values. Hidden from respondents. Use with calculateValue action in logic rules to accumulate or compute values. Example: Create a "Total Score" field and add points via logic rules. For URL-seeded metadata, use editor_insertHiddenField instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName for the calculated field (e.g., "Total Score", "cart_total")
afterNoNodeId to insert after. Use $prev to chain. Omitting appends to end (usually wrong).
formIdYesForm ID to insert into
parentIdNoParent node ID to insert into (e.g., column1)
positionNoPosition among siblings: inside parentId when given, else at the top level ('first' = top of the form, e.g. a title). Not combinable with after.
fieldTypeNoType of the calculated valuenumber
initialValueNoInitial value (default based on fieldType)

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 already declare it is a non-read-only, non-destructive, closed-world mutation, so the bar is lowered. The description adds genuinely new behavioral context: the field is hidden from respondents and is designed to be driven by calculateValue logic rules, which the annotations do not convey.

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?

Four tightly packed sentences: purpose first, then visibility, then the driving action, then an example, then the sibling alternative. Every sentence earns its place with 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 seven-parameter mutation tool with no output schema, the description covers purpose, intended workflow, and the key sibling boundary. It omits what the call returns (e.g. the created node/field ID), which an agent inserting-then-chaining would benefit from, but otherwise nothing essential is missing.

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%, so the schema already documents all seven parameters thoroughly (including chaining via $prev and position/after incompatibility). The description adds a naming example and the fieldType-in-practice hint, but does not meaningfully extend parameter semantics beyond the 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?

Specific verb+resource ('Insert a calculated field') plus the concrete use cases (scoring, counters, computed runtime values) make the tool's role unmistakable. It explicitly distinguishes itself from the sibling editor_insertHiddenField, so an agent can route correctly without opening either schema.

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?

States when to use it (with the calculateValue action in logic rules), gives a worked example ('Total Score' field accumulating points), and names the alternative for URL-seeded metadata. This is explicit when/when-not/alternative guidance.

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.