Skip to main content
Glama

exec_with_secrets

Run shell commands with project secrets injected as environment variables; leaked secrets are redacted from stdout/stderr before output is returned.

Instructions

[exec] Run a child shell command with project secrets injected as environment variables and any leaked secret values redacted from captured stdout/stderr before they return to the agent. Use to let an agent run a script that needs credentials (npm run db:migrate, terraform plan, vercel deploy) without ever putting plaintext values in the chat; prefer env_generate if you need to write a .env file to disk and validate_secret for upstream liveness checks. Spawns a real child process — has whatever side effects the command itself causes (writes, network, exec). Subject to BOTH tool policy and exec policy (allowlist/denylist). Returns a text body with Exit code: N then STDOUT: and STDERR: blocks; both streams are scrubbed against the secret values that were injected.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argsNoPositional arguments passed to `command`. Example: ['run', 'db:migrate']. Each element is passed verbatim with no extra shell parsing.
keysNoWhitelist of exact key names to inject. Omit to inject every secret in scope (subject to `tags`).
tagsNoInject only secrets carrying at least one of these tags. Combinable with `keys` as an AND filter.
orgIdNoOrganization identifier for org-scoped secrets. Required only when scope='org'. Example: 'acme-corp'.
scopeNoWhere the secret lives. 'global' = user keyring (default if omitted on reads), 'project' = scoped to projectPath, 'team' = team-shared (needs teamId), 'org' = org-shared (needs orgId).
teamIdNoTeam identifier for team-scoped secrets. Required only when scope='team'. Example: 'acme-platform'.
commandYesExecutable name or full command to run. Example: 'pnpm', 'node', '/usr/bin/env'. Must be allowed by exec policy.
profileNoExec sandbox profile. 'restricted' (default) limits PATH and inheritable env vars; 'ci' is restricted plus CI-friendly defaults (no TTY); 'unrestricted' inherits the full server environment — only pick this when you understand the leak risk.restricted
projectPathNoAbsolute path to the project root for project-scoped secrets and policy resolution. Defaults to the MCP server's current working directory when omitted.
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that a real child process is spawned with side effects, that stdout/stderr are scrubbed of leaked secrets, and that both tool and exec policies apply. It could mention timeouts or resource limits, but the disclosed details are substantial and accurate.

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 relatively long but efficient: it front-loads the core action, gives concrete examples, then lists side effects and return format. Every sentence adds value, though a slight trim could improve conciseness.

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?

Given the tool's complexity (9 parameters, no output schema, no annotations), the description covers purpose, usage, behavioral nuances, and return format thoroughly. It lacks details on potential timeouts or cancellation, but overall it is sufficiently complete for an agent.

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 coverage is 100% with well-described parameters. The description does not add significant parameter-specific details beyond what schema already provides; it focuses on overall behavior. Hence baseline 3 is appropriate.

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 '[exec]' and clearly states the verb (Run a child shell command) and resource (with project secrets injected and redacted). It explicitly distinguishes itself from sibling tools `env_generate` and `validate_secret`, making its unique role unmistakable.

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?

The description provides explicit when-to-use guidance (running scripts needing credentials like `npm run db:migrate`) and when-not-to-use alternatives (`env_generate` for `.env` files, `validate_secret` for liveness checks). It also warns about side effects and policy constraints, giving the agent clear decision rules.

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

Install Server

Other Tools

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/I4cTime/quantum_ring'

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