Skip to main content
Glama
Yan-Vi
by Yan-Vi

set_state_var

Add or replace a flow-scoped state variable within an Easy Spec project.

Instructions

Add or replace a flow-scoped state variable (a let declared at the top of the generated function).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
flowIdYes
initialYes
projectNoPath to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only mentions the mutating action 'add or replace' but does not describe permissions, reversibility, side effects, or what happens on conflict. Minimal behavioral context for a mutation tool.

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?

The description is a single concise sentence that front-loads the action and resource. No filler or redundant wording.

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

Completeness2/5

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

The description is incomplete for a mutation tool with no output schema and sparse parameter documentation. It lacks parameter explanations, usage guidance, and behavioral details, leaving an agent with insufficient context to call it correctly.

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

Parameters2/5

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

Schema description coverage is only 25% (only 'project' is documented). The description does not explain the required parameters 'name' or 'initial', nor does it clarify the meaning of 'flowId'. It fails to 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 states a specific action ('Add or replace') on a specific resource ('flow-scoped state variable') and clarifies it's a `let` at the top of the generated function. It is clear but does not explicitly differentiate from siblings like set_variable or remove_state_var, so it misses a point for distinctiveness.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus alternatives like set_variable or remove_state_var. No context is given about scenarios where this tool is appropriate or when to avoid it.

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