Skip to main content
Glama

exec_with_secrets

Run shell commands with project secrets injected as environment variables, automatically redacting any leaked secrets from output before returning to the agent.

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) denies network-tool binaries (curl, wget, ssh, scp, nc, netcat, ncat) AND common interpreters/shells (python, node, deno, bun, perl, ruby, php, sh, bash, zsh) — since those could otherwise egress the injected secrets — strips proxy env vars, and caps runtime at 30s. It still is NOT a real OS sandbox (it does not restrict PATH, and some allowed binary could in principle make network calls); for genuinely untrusted commands use OS-level isolation (containers, network namespaces). 'ci' allows network and interpreters with a 300s cap and blocks a few destructive commands; 'unrestricted' inherits the full server environment. Define a custom profile in .q-ring.json to allow specific interpreters with secrets.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.
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers richly. It discloses that it spawns a real child process with arbitrary side effects ('writes, network, exec'), that output is scrubbed against injected secrets, that both tool and exec policies gate usage, and details the return format ('Exit code: N' then STDOUT/STDERR blocks). The profile parameter description adds critical caveats (restricted is NOT a real OS sandbox, PATH not restricted).

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?

Two substantial sentences, front-loaded with the verb+action and distinguishing features. The second sentence adds essential caveats. It's dense but every clause earns its place — the only minor deduction is that it's fairly long and the redaction/return-format details could arguably be tightened.

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?

For a high-complexity tool (9 params, multiple security modes, side effects, policies, output scrubbing) with no annotations and no output schema, the description is remarkably complete. It covers return format, behavioral caveats, policy constraints, and sibling differentiation entirely in text. Nothing critical is left unexplained for an agent to safely invoke this dangerous tool.

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. The description goes beyond the schema by reinforcing the 'prefer env_generate/validate_secret' distinction and explaining the exec-policy gating on `command`. However, it does not enumerate parameter-specific semantics beyond what the schema already states (e.g., it doesn't detail the profile tradeoffs in the main body — those live only in the schema's profile description). Slightly above baseline.

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 begins with '[exec] Run a child shell command with project secrets injected as environment variables and any leaked secret values redacted from captured stdout/stderr' — a specific verb (Run), explicit resource (child shell command with secrets injected), and the defining behavioral trait (secret redaction). It clearly distinguishes from siblings like env_generate (write .env to disk), validate_secret (liveness checks), and get_secret/list_secrets (read-only access), naming alternatives directly.

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?

Provides explicit when-to-use ('let an agent run a script that needs credentials... without ever putting plaintext values in the chat'), explicit prefer-alternatives ('prefer env_generate if you need to write a .env file to disk and validate_secret for upstream liveness checks'), and clear exclusions ('Subject to BOTH tool policy and exec policy'). This is textbook usage guidance.

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/q-ring'

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