Skip to main content
Glama

run_with_secrets

Run shell commands with 1Password secrets injected as environment variables and replace secret values in output with [secret NAME] to keep credentials hidden.

Instructions

Run a shell command with 1Password secrets injected as environment variables. Windows: PowerShell (reference as $env:NAME); Linux/macOS: bash (reference as $NAME). Output (stdout+stderr) is returned with secret values replaced by [secret NAME].

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": {
      "secrets": "<secrets>"
    },
    "name": "run_with_secrets"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoWorking directory
argvNoAlternative to command: program and arguments, run without a shell
shellNo"wsl" runs the command in WSL bash (Windows only)
commandNoShell command to run (PowerShell on Windows, bash elsewhere)
secretsYesItem names that are variable names, e.g. ["GITHUB_TOKEN"]; or a map from env var to item: {"APP_USER": {"item": "Staging admin", "field": "username"}, "APP_PASS": {"item": "Staging admin", "field": "password"}}. Map values may also be "Item title", "Item title.field" or "op://vault/item/field". Without a field, the item's primary field is used.
timeout_secondsNoDefault 120, max 600

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it discloses that secrets are injected as env vars, that the shell differs by OS (PowerShell vs bash), and that output is stdout+stderr merged with secret values redacted to [secret NAME]. It stops short of describing failure behavior, exit codes, or timeout effects.

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 tight sentences with the core action front-loaded, followed by platform specifics and the output contract. No filler or repetition of schema content.

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 an arbitrary-command-execution tool with no annotations and no output schema, the description covers the return value (merged, redacted output) and platform shell behavior, which is the important missing structured data. It omits failure/exit-code semantics and safety framing around command execution.

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 would be 3, but the description adds real meaning beyond it by documenting the exact env-var reference syntax per platform ($env:NAME on Windows, $NAME on Linux/macOS). The `secrets` map/array forms and `timeout_seconds` are left to the already-detailed schema.

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 states a specific verb and resource — run a shell command with 1Password secrets injected as environment variables — and immediately scopes it by platform. It is clearly distinct from the sibling secret-management tools (list_secrets, save_secret), which do not execute commands.

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?

Usage is only implied: an agent can infer it should call this when a command needs secrets, but there is no explicit when-to-use/when-not guidance and no caution about executing arbitrary commands. The choice between `command`, `argv`, and `shell: wsl` is left entirely to the schema.

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

Deploy Server

Other Tools