Skip to main content
Glama
CakeRepository

1Password MCP Server

op_run

Run local shell commands, API calls, or scripts with 1Password secrets injected as environment variables from op:// references, keeping plaintext out of the model context.

Instructions

Run a local shell command with 1Password secrets injected as environment variables. Resolved values go only into the child process environment, are never logged by the server, and are redacted from stdout/stderr on a best-effort basis (including common encodings such as JSON, URL and base64) — a command that deliberately transforms or transmits a secret can still expose it. This is the preferred way to USE a secret in a command, API call, or script: prefer op_run with op://vault/item/field references in env over reading a secret with password_read/item_get and pasting it into a command yourself, which would put the plaintext in the model context and transcript.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking directory to run the command in, e.g. a repo checkout path.
envNoMap of ENV_VAR_NAME -> value. A value matching op://vault/item/field is resolved via 1Password and injected as plaintext into the child process env only; any other value is passed through unchanged as a literal.
argvNoArgument vector [executable, ...args] to execute directly without a shell (safer against quoting/injection issues). Provide either `command` or `argv`, not both.
shellNoOptional shell executable to use with `command` (e.g. 'powershell.exe', 'C:/Program Files/Git/bin/bash.exe', '/bin/bash'). Defaults to the platform shell (cmd.exe on Windows, /bin/sh elsewhere). Ignored when `argv` is used.
stdinNoOptional text to write to the process's stdin.
commandNoShell command line to execute (run via the platform shell). Provide either `command` or `argv`, not both.
timeout_msNoKill the process and everything it started if it runs longer than this many milliseconds. Default 120000 (2 minutes).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv5.0.0
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"Kill the process if it runs longer than this many milliseconds. Default 120000 (2 minutes)."New value: +"Kill the process and everything it started if it runs longer than this many milliseconds. Default 120000 (2 minutes)."
  2. Addedv4.0.1

TDQS

A4.3/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 so well: it specifies that resolved values live only in the child process environment, are never logged by the server, and are redacted from stdout/stderr on a best-effort basis across JSON/URL/base64 encodings — and candidly admits the limit that a command which transforms or transmits a secret can still leak it. It stops short of characterizing the side-effect/risk profile of executing arbitrary shell commands (filesystem, network, privilege), which matters for a tool with no annotations.

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?

Front-loaded with the action and its differentiator, then the security caveat, then the routing preference — no sentence is filler. The encoding list and the long final clause are dense but each carries actionable information, so the length is justified for a security-sensitive tool.

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?

Covers purpose, secret-handling behavior and sibling routing for a 7-parameter tool with nested objects. The gap is the return contract: there is no output schema, and the description never states what the caller gets back (stdout/stderr/exit code shape), which an agent needs to interpret results.

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 100%, so the schema already documents cwd, env, argv, shell, stdin, command and timeout_ms, including the command-vs-argv exclusivity. The description's discussion of `env` and op:// resolution restates what the schema says rather than adding format or edge-case detail. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

Combines a specific verb and resource ('Run a local shell command') with the distinguishing capability ('1Password secrets injected as environment variables'), which no sibling tool offers. It also explicitly names the sibling behaviors it supersedes (password_read/item_get), so an agent can route without opening any 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?

States the preferred path and the exact alternative it replaces: use op_run with op://vault/item/field references in `env` rather than reading a secret and pasting plaintext into a command. The condition for choosing it is explicit, not inferred.

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