Skip to main content
Glama

Write a project variable

write_variable
Idempotent

Create or replace one film-root let (a project variable). Pass name, type and value as text; an enum also needs options. Replaces the variable if that name already exists. Bind it in the film as {name} with patch_film: color="{brand}". Prefer this over rewriting a tag with patch_film. branchId null (or left out) means the current version; a version id from list_branches writes that version without switching the editor to it. Types: string, integer, number, boolean, color, enum.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
typeYes
valueYesThe value as text: 12 or 0.5 for integer and number, true or false for boolean, #ff4d00 for color, one of options for enum.
optionsYesEnum only: the allowed values. null for every other type.
branchIdYesVersion id from list_branches to write to, without switching the editor to it. null, or leaving it out, means the current version.
projectIdYesThe project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare idempotentHint=true and destructiveHint=false; the description reinforces this with 'Replaces the variable if that name already exists' (upsert semantics) and adds non-obvious context that a version id writes without switching the editor. It does not, however, discuss failure modes or permission requirements. Strong add-on value over the annotations, just short of rich.

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?

Front-loaded with the core verb, then type rules and branch semantics; nearly every clause carries information. It is dense and slightly run-on with the inline film-binding example, but not wasteful.

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 6-required-param mutation tool with no output schema, the description covers upsert behavior, valid types, value syntax, and branch targeting. An agent could call it correctly; only error/return behavior is left unstated.

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

Parameters4/5

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

Schema coverage is 67% and the description compensates: it enumerates all six valid types, explains that value is passed as text and that enum requires options, and restates branchId's null meaning. This adds real meaning beyond the schema text, though projectId only repeats 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?

The description names a specific verb+resource ('Create or replace ... a project variable') and immediately scopes it against the sibling read_variables and the alternative patch_film. The agent can tell this apart from patch_film and read_variables without opening any 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?

It states when to use this tool ('Prefer this over rewriting a <let> tag with patch_film'), names the alternative explicitly, and explains the branchId null-vs-version-id choice. Routing is left 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.