Skip to main content
Glama

variable_save

Destructive

Saves a variable for AI agents when the user asks to keep a value: an access, a token, an address or an environment setting. A secret (secret) is stored encrypted and is never returned in responses. If a variable with the same level, scope, path and key exists, the passed fields are replaced. Levels company, project and repository require memory:moderate; user and token are the user's own. With path the value is the file /run/agent/vars// on the agent VM, without path it is the environment variable key.

Input Schema

NameRequiredDescriptionDefault
keyYesEnvironment variable or file name.
descNoWhy and how it is used; shown to agents.
jobsNoKinds of work that need the variable; empty - all.
pathNoFile directory without a leading /.
typeNoDefaults to string.
levelYesScope: company, project, repository; user - the user's own; token - the token of this connection.
titleNoTitle: what it is.
valueYesValue: number - a number, json - valid JSON, binary - base64.
secretNotrue - a secret: stored encrypted, the value is not shown.
projectIDNoProject ID, for level = project.
allCompaniesNoFor level = user: true - in all of the user's companies; by default only in this one.
repositoryIDNoRepository ID, for level = repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description discloses that secrets are stored encrypted and never returned, that an existing same-level/scope/path/key variable has its passed fields replaced (explaining the destructive behavior), the required memory:moderate permission, and where the value physically lands (file path vs env var). This is unusually rich behavioral context.

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?

The description is dense but front-loaded, opening with the purpose before moving to secret handling, upsert semantics, level permissions, and path behavior. Every sentence carries information, though it packs several distinct concerns into a single long paragraph.

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 12-parameter mutation tool with no output schema, the description covers the highest-risk behaviors (overwrite, secret encryption, permissions, storage location) and notes that secrets are not returned. It omits any mention of return values or error cases, but with a 100%-covered schema and destructive annotations this is close to complete.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning: 'path' determines the file /run/agent/vars/<path>/<key> on the agent VM while omitting it produces an environment variable, and 'level' values are tied to permissions and ownership. It still leaves type/jobs/desc/title/allCompanies behavior entirely to 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 and resource ('Saves a variable') and adds the intended use case ('when the user asks to keep a value') plus the storage destinations (file under /run/agent/vars vs environment variable). It never names a sibling such as memory_create, so an agent cannot tell from this text alone how it differs from the memory_* family.

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?

It gives a clear trigger ('when the user asks to keep a value') and prerequisites (company/project/repository levels need memory:moderate). It does not name an alternative tool or say when NOT to use this one, so the routing guidance is context-rich but not exhaustive.

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.

Resources