Ask the user for a secret
request_secretCollect 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
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | command: absolute folder to run it in. Required for commands. | |
| key | No | env: the variable name, e.g. STRIPE_SECRET_KEY. Replaced if it's already there, otherwise added. | |
| path | No | env / file: absolute path of the file, e.g. /home/me/app/.env. Created (owner-only) if it doesn't exist. | |
| label | No | What to paste, shown above the box, e.g. "Stripe secret key (sk_test_…)" or "6-digit code from the SMS". | |
| reason | Yes | Why you need it and what it's for, shown to the user, e.g. "Stripe test secret key for the checkout tests". Required. | |
| command | No | command: the shell command to run. Don't put the secret in it: it's passed on stdin, or as $env_name. | |
| pass_as | No | command: "stdin" (default) pipes the secret in with no trailing newline; "env" sets it as an environment variable named env_name. | |
| env_name | No | command with pass_as "env": the variable name, default SECRET_VALUE. The command must reference it, e.g. tool login --token "$SECRET_VALUE". | |
| multiline | No | Whether the value spans several lines (a PEM key, a JSON file). Default: true for whole files, otherwise false. | |
| overwrite | No | file without placeholder: allow replacing a file that already exists. Default false. | |
| notify_url | No | Optional webhook: when it's done, POST {event, request} (never the value) here. https://, or http:// on localhost. | |
| destination | Yes | "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. | |
| placeholder | No | file: 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_seconds | No | How long this call waits for the user before returning "waiting", 0–55. Default 50. | |
| expires_in_minutes | No | How long the request stays open, 1–240. Default 30. |