Skip to main content
Glama

Ask the user for a secret

request_secret

Collect a secret via a local browser paste page and deliver it straight to a .env key, file placeholder, or command stdin, keeping the value out of chat.

Instructions

Have the user paste a secret (API key, password, token, pre-shared key, one-time PIN) into a local page, which writes it straight to where it's needed: a KEY in a .env file, a placeholder or a whole file, or a command's stdin. You never see the value; you get back whether it was delivered and where. Use this instead of asking for any secret in the chat.

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": {
      "destination": "<destination>",
      "reason": "<reason>"
    },
    "name": "request_secret"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNocommand: absolute folder to run it in. Required for commands.
keyNoenv: the variable name, e.g. STRIPE_SECRET_KEY. Replaced if it's already there, otherwise added.
pathNoenv / file: absolute path of the file, e.g. /home/me/app/.env. Created (owner-only) if it doesn't exist.
labelNoWhat to paste, shown above the box, e.g. "Stripe secret key (sk_test_…)" or "6-digit code from the SMS".
reasonYesWhy you need it and what it's for, shown to the user, e.g. "Stripe test secret key for the checkout tests". Required.
commandNocommand: the shell command to run. Don't put the secret in it: it's passed on stdin, or as $env_name.
pass_asNocommand: "stdin" (default) pipes the secret in with no trailing newline; "env" sets it as an environment variable named env_name.
env_nameNocommand with pass_as "env": the variable name, default SECRET_VALUE. The command must reference it, e.g. tool login --token "$SECRET_VALUE".
multilineNoWhether the value spans several lines (a PEM key, a JSON file). Default: true for whole files, otherwise false.
overwriteNofile without placeholder: allow replacing a file that already exists. Default false.
notify_urlNoOptional webhook: when it's done, POST {event, request} (never the value) here. https://, or http:// on localhost.
destinationYes"env": set a KEY in a dotenv file. "file": replace a placeholder in a file, or write a whole file. "command": run a command that reads the secret from stdin or an env var.
placeholderNofile: text already in the file to replace with the secret (every occurrence), at least 4 characters, e.g. __API_TOKEN__. Omit to write the whole file.
wait_secondsNoHow long this call waits for the user before returning "waiting", 0–55. Default 50.
expires_in_minutesNoHow long the request stays open, 1–240. Default 30.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations only flag that this is not read-only and not destructive; the description adds the essential behavioural fact the annotations cannot convey: "You never see the value; you get back whether it was delivered and where." It also surfaces the non-blocking wait model (returning "waiting"), the overwrite protection, the owner-only file creation, and the guarantee that the webhook never carries the value.

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 sentences, front-loaded with the core action, then the destination modes, then the key safety property, then the alternative. No sentence is redundant; the parenthetical secret-type list and destination list both carry real routing information.

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 a 15-parameter mutation tool with no output schema, the description still tells the agent that the return is a status plus destination rather than the secret, which is the most important thing to know. It leaves the follow-up state machine (what "waiting" means for subsequent calls, expiry behaviour) to the schema and siblings, which is a minor gap rather than a blocking one.

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 all 15 parameters are already documented with per-field meaning and enums. The description only summarises the three destination modes (env key, placeholder/whole file, command stdin), which the schema already spells out in more detail; it adds no field-level nuance such as the placeholder match rules or wait/expiry interaction.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific action and resource: have the user paste a secret into a local page, and it is written directly to one of three destinations (env key, file/placeholder, or command stdin). It distinguishes itself from chatting the secret, but does not name the sibling tools (wait_for_secret, check_secret) that continue the flow, so an agent must infer the division of labour.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit directive with an exclusion: "Use this instead of asking for any secret in the chat." It also implicitly scopes usage to writes that need a secret delivered. It stops short of telling the agent what to do afterwards when the call returns "waiting" (which sibling to poll), so the when-to-use story is clear only at the entry point.

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