Intent reference

Built. store_secret saves a value the agent already holds, such as a key a provider just showed it, as a new BotPassword item marked agent-supplied, and returns…

Built Built for new items. Writing a new revision of an existing item needs a grant and the person's confirmation every time, which is not built yet, so that form answers scope_denied or not_implemented and writes nothing.

At a glance

MCP toolstore_secret ("Store a secret")
CLIbpw agent store_secret
Default frictionNone for a new item. The new item is usable by no intent until the person adds it to a grant.
DeliveryWrite-only: the value goes into the vault and the result carries only the item reference.
MCP hintsreadOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false

Parameters

Required: value. Unknown arguments are refused. The descriptions are the tool's own, as bpw mcp serves them.

NameTypeRequired?Description
titlestringoptionalTitle of the new item. 1 to 256 bytes.
valuestringrequiredThe secret value to store. It is written to the new item and never returned. 1 to 32768 bytes.
kindstringoptionalKind of the new item. One of api_key, login, secure_note, totp. Default api_key.
usernamestringoptionalUsername or account name for the new item, if it has one. 1 to 256 bytes.
sitestringoptionalA site origin or host, for example https://dash.example.com. 1 to 2048 bytes.
credentialstringoptionalA credential reference (item ID), as list_credentials returns it. Not a secret value. Not empty.

Example

A tools/call request, with placeholder references (use the id that list_credentials returns):

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "store_secret",
    "arguments": {
      "title": "Example webhook signing key",
      "kind": "api_key",
      "site": "https://api.example.com",
      "value": "<the value the agent holds>"
    }
  }
}

The result. The same JSON is also sent as text in content[0].text; isError is false for success.

{
  "structuredContent": {
    "outcome": "success",
    "item": "ITEM-EXAMPLE-NEW"
  },
  "isError": false
}

With the CLI the value comes from stdin, never from an argument.

From the command line

bpw agent store_secret --title 'Example webhook signing key' --kind api_key --site https://api.example.com --secret-stdin

bpw agent <intent> sends the same request as the MCP tool, through the same policy. Every intent except status needs a live agent session, or the answer is session_required. Run the harness with bpw agent run -- <harness>. On macOS and Linux, an enrolled harness started normally can also be approved in the desktop app or with bpw session approve.

Result fields

Every result is one JSON object. Only outcome is always present.

FieldTypeMeaning
outcomestringThe typed outcome code. Always present.
detailstringThe request ID, rotation step, revision or reason, for the outcomes that carry one.
intentstringWith not_implemented: the intent this build cannot carry out.
reasonstringWith rejected: why the call was refused.
messagestringWith rejected or daemon_unavailable: what was wrong. Never quotes an argument value.
next_stepstringOn a result that is not a plain success: one sentence on what to do now. Fixed text chosen by the outcome code; it never asks for a password or secret and never says to get around a refusal.
itemstringThe new item's reference. The item is usable by no intent until the person grants it.

Outcomes it can return

  • success: The request ran.
  • needs_human: Something only a person can do stands in the way.
  • not_implemented: Policy allowed the request, and this build has no way to carry it out.
  • scope_denied: The most common refusal.
  • session_required: The call did not come from inside a live agent session: none was presented, it expired, or it is malformed.
  • vault_locked: BotPassword on this device is locked, so no credential can be used.
  • rejected: The request was malformed before policy saw it.
  • daemon_unavailable: bpw mcp or bpw agent could not reach botpasswordd, the desktop daemon that holds the keys.

See the outcome reference for what each one means and what to do next.

Limits

  • Kinds are api_key, login, secure_note and totp; values are at most 32 KiB.
  • Agents may store at most 100 items per 10 minutes per daemon, shared by all agents; past that the answer is needs_human.
  • The agent-supplied mark is written into the item's notes, which the person can edit.

Tool description

What the MCP tool tells the agent, verbatim from bpw mcp:

Stores a secret value this agent already holds as a new BotPassword item, marked as agent-supplied; give title (and optionally kind, username, site). With credential instead, it asks to write the value as a new revision of that existing item: that needs a grant naming the item and the person's confirmation in BotPassword every time, which this build does not have yet, so it is refused (scope_denied) or answers not_implemented, and nothing is written. This tool accepts one secret value, stores it as a new item, and returns only the new item's reference. It never returns a secret value, and it changes an existing item only with a grant and the person's confirmation. The result is a typed outcome such as success, vault_locked or scope_denied.

Status: capture_secret is planned, not built yet.