Skip to main content
Glama

Pull environment to a file

pull_env

Prepare a one-time download into a local file without exposing its values in the tool response. Use pull_env to pass variables to a local task; use reveal_values when the task needs a value in memory. Run commands.sh or commands.powershell from the text result in the target directory. The command overwrites the target file if it exists. Set format and file together, for example json and config.json; the extension does not select the format. A zero-knowledge project's file is a sealed bundle (JSON of ciphertext) whatever format is set; the Secret Store CLI or Action opens it on your machine, so run pull_env through them. For a subset, pass a nonempty keys list. Compare the returned keys with the ones the task needs before using the file. Notes name excluded keys. No readable match fails the call, as does any selected protected key covered by a grant if the owner lacks unlock access. Needs secrets:read. Issuing the ticket can spend a single-use access grant; the ticket itself is a credential valid for one download within 10 minutes. Issuance and redemption are audited. Report key names without reading the file back. Keep the ticket and commands out of chat and logs.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "environment": "<environment>"
    },
    "name": "pull_env"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoBare file name the command writes in the directory it runs in, e.g. .env.local (default) or .env. Up to 64 letters, digits, dots, dashes and underscores; no slash, space or leading dash.env.local
keysNoUp to 200 exact key names, e.g. ["DATABASE_URL", "API_KEY"]. Omission or [] selects all readable keys. Absent names do not appear in the export
formatNoFile format: dotenv (KEY=value lines, default), json (one object) or shell (export KEY=value lines)dotenv
projectYesProject slug from list_projects, e.g. my-app, or its id (a UUID)
environmentYesEnvironment slug, e.g. development, preview or production, or its id (a UUID)

Output Schema

NameRequiredDescriptionDefault
keysYes
ticketYes
projectYes
pullUrlYes
expiresAtYesISO 8601 timestamp
environmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / keys / description
      Previous value: -"Only these exact key names, e.g. [\"DATABASE_URL\", \"API_KEY\"], up to 200 (default: every key the token may read)"New value: +"Up to 200 exact key names, e.g. [\"DATABASE_URL\", \"API_KEY\"]. Omission or [] selects all readable keys. Absent names do not appear in the export"
  2. Changed5 schema fields changed
    • changedInput schema / properties / environment / description
      Previous value: -"Environment slug or id, e.g. development, preview or production"New value: +"Environment slug, e.g. development, preview or production, or its id (a UUID)"
    • changedInput schema / properties / file / description
      Previous value: -"File name the command writes, in the current directory (default .env.local)"New value: +"Bare file name the command writes in the directory it runs in, e.g. .env.local (default) or .env. Up to 64 letters, digits, dots, dashes and underscores; no slash, space or leading dash"
    • changedInput schema / properties / format / description
      Previous value: -"File format: dotenv (default), json or shell exports"New value: +"File format: dotenv (KEY=value lines, default), json (one object) or shell (export KEY=value lines)"
    • changedInput schema / properties / keys / description
      Previous value: -"Only these keys, up to 200 (default: every key the token may read)"New value: +"Only these exact key names, e.g. [\"DATABASE_URL\", \"API_KEY\"], up to 200 (default: every key the token may read)"
    • changedInput schema / properties / project / description
      Previous value: -"Project slug or id"New value: +"Project slug from list_projects, e.g. my-app, or its id (a UUID)"
  3. Changed2 schema fields changed
    • changedInput schema / properties / format / description
      Previous value: -"File format"New value: +"File format: dotenv (default), json or shell exports"
    • changedInput schema / properties / keys / description
      Previous value: -"Only these keys (default: all)"New value: +"Only these keys, up to 200 (default: every key the token may read)"
  4. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the annotations, it discloses that the target file is overwritten, that issuing the ticket may spend a single-use access grant, that the ticket is a credential valid for one download within 10 minutes, that issuance and redemption are audited, and which conditions cause failure (no readable match, protected key without owner unlock access). It also warns to keep the ticket and commands out of chat and logs and to report key names without reading the file back.

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 most important fact, that values are not exposed in the response, is front-loaded, followed by the sibling routing and then operational constraints. It is dense and slightly long, but nearly every sentence carries a distinct operational or security constraint.

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

Completeness5/5

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

With annotations, a full input schema, and an output schema already present, the description still covers the gaps that matter: permissions (secrets:read), credential handling, overwrite behavior, zero-knowledge sealed-bundle semantics, subset selection, and failure modes. Nothing an agent needs to invoke this tool safely appears to be missing.

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 100%, so the baseline is 3, but the description adds real meaning: format and file must be set together, the file extension does not select the format, an empty or omitted keys list selects all readable keys, and excluded keys appear as notes. These are behavioral couplings the schema alone does not convey.

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 and outcome ('Prepare a one-time download into a local file without exposing its values in the tool response') and explicitly contrasts itself with reveal_values for in-memory values. An agent can distinguish pull_env from reveal_values and find_secret_keys 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?

It states when to use this tool versus the alternative ('use reveal_values when the task needs a value in memory') and when a subset should be requested ('pass a nonempty keys list'). It also gives the required execution context: run commands.sh or commands.powershell from the text result in the target directory, and run through the Secret Store CLI or Action for zero-knowledge projects.

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