Skip to main content
Glama

Set API Environment Variable

unfour.api.set_environment_variable

Create or update an API environment variable for a specific environment and key. Supports empty values, preserves existing metadata when optional fields are omitted, and masks returned secrets.

Instructions

Creates or updates one API environment variable by environmentId and key through the command bus. Empty values are allowed. Omitted isSecret/description preserve existing metadata, and returned secrets are masked.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYes
valueYes
enabledNo
isSecretNo
descriptionNo
workspaceIdNo
environmentIdYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
createdYes
variableYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Addedv0.9.1

TDQS

A4/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false (not read-only) and idempotentHint=false. The description adds meaningful behavioral details beyond these: 'Empty values are allowed,' 'Omitted isSecret/description preserve existing metadata,' and 'returned secrets are masked.' These are not derivable from the schema or annotations and help the agent understand edge-case semantics.

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?

Three concise sentences, front-loaded with the core action. Each sentence adds distinct value: the action, the empty-value edge case, and the preservation/masking behavior. No fluff or repetition.

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 7-parameter tool with an output schema, the description covers the most critical contextual aspects: create-or-update behavior, empty values, metadata preservation, and secret masking. Missing details like the role of 'enabled' and 'workspaceId' are minor, and the presence of an output schema reduces the need to describe return values. Overall, sufficient for an agent to call the tool correctly in most scenarios.

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 0%, so the description must compensate. It explicitly names environmentId and key as locators, implies value via 'Empty values are allowed,' and explains behavior for isSecret/description when omitted. However, it does not address the 'enabled' or 'workspaceId' parameters, leaving some parameter semantics undocumented. It partially compensates but is not exhaustive.

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 opens with a specific verb phrase, 'Creates or updates,' and names the exact resource, 'one API environment variable,' with the identifying keys (environmentId and key). This clearly distinguishes the tool from siblings like workspace.create_variable or api.update_environment, and the title reinforces the purpose.

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

Usage Guidelines3/5

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

The description implies usage by stating what the tool does, but it does not explicitly state when to use this tool versus alternatives such as workspace.create_variable or api.update_environment. There is no mention of exclusions or conditions that would route an agent to a different tool. The naming and context make the use case inferable, but the description itself offers no explicit guidance.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zyqzyq/Unfour'

If you have feedback or need assistance with the MCP directory API, please join our Discord server