Intent reference

Built. request_access asks the person for a grant on one credential, with the intents, scope, lifetime and a one-line reason.

Built Built for run_with, http_request and rotate grants, approved in the desktop app's Ledger or with bpw access approve. Approval on your phone is planned, not built yet, and so is asking for a cli_login, sign_in or fill_totp grant this way (you add those with bpw grant add).

At a glance

MCP toolrequest_access ("Request access")
CLIbpw agent request_access
Default frictionOne approval by the person, with their master password, in BotPassword on the desktop or with bpw access approve. Nothing changes until they decide.
DeliveryNo value is involved. The grant it asks for is sealed unless disclose is true: a sealed run_with ask must name hosts, and the command gets a placeholder.
MCP hintsreadOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false

Parameters

Status: rotate is partly built.

No parameter is required by the schema. Unknown arguments are refused. The descriptions are the tool's own, as bpw mcp serves them.

NameTypeRequired?Description
credentialstringoptionalA credential reference (item ID), as list_credentials returns it. Not a secret value. Not empty.
looking_forstringoptionalIn place of credential, when you do not know the item's reference: one line saying what you need, such as the site or host and what it is for ("the API key for api.example.com, to deploy"). The person reads it, chooses the item in BotPassword or declines. It is not a search: the reply is the same whether or not anything matches, and names the item only once approved. 1 to 200 bytes.
environmentstringoptionalEnvironment reference as ORG:ENV or ORG/ENV (ADR 0063 section 7). In run_with, replaces env, files and sealed; in request_access, replaces credential and looking_for. 1 to 121 bytes.
onlyarray of stringoptionalWith environment: restrict to these variable names. Under a sealed environment grant, pass only sealable variable names to omit unsealable ones. 1 to 256 items, each once.
intentsarray of stringoptionalThe intents to ask for on the credential: run_with and/or http_request, or rotate alone. One of run_with, http_request, rotate (partly built).
reasonstringoptionalWhy you need it, in one line. The person sees it labelled as your unverified words. 1 to 500 bytes.
ttl_secondsintegeroptionalHow long the grant should last (default 3600). The person may shorten it. 60 to 604800.
disclosebooleanoptionalrun_with: let the command read the value. Without it a run_with ask is sealed and must name hosts.
hostsarray of stringoptionalhttp_request, sealed run_with: hosts (host or host:port, exact, each once) the value may be sent to. On run_with, the command gets a placeholder and a proxy for the run swaps in the value only on requests to these hosts. 1 to 16 items.
pathsarray of stringoptionalhttp_request, sealed run_with: paths, /exact or /prefix/* (default /*). 1 to 16 items.
methodsarray of stringoptionalhttp_request, sealed run_with: methods (default GET). 1 to 16 items.
headerstringoptionalhttp_request, sealed run_with: the header the value goes in (default authorization). request_access takes only headers that carry an API credential: authorization, x-api-key, api-key, apikey, x-auth-token, x-goog-api-key, private-token. 1 to 64 bytes.
prefixstringoptionalhttp_request, sealed run_with: text before the value in that header (default "Bearer "). 0 to 64 bytes.
commandsarray of stringoptionalrun_with: executables it may start with any arguments, by absolute path or name. 0 to 16 items.
argvarray of stringoptionalrun_with: argv rules, the program then exact arguments, optionally ending in *, for example "npm publish --access public". 0 to 16 items.
max_usesintegeroptionalOptional lifetime use-count limit for the requested grant. The person may tighten it. 1 to 100000.
ratestringoptionalOptional rate limit for the requested grant, as N/WINDOW (for example "5/60s", "10/1m", "100/1h"). The person may tighten it. 3 to 32 bytes.
requeststringoptionalCheck a request made earlier: its request ID. Give nothing else but wait_seconds. 1 to 64 bytes.
wait_secondsintegeroptionalWith request: wait up to this long for the person's decision. 1 to 30.

Status: rotate is partly built.

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": "request_access",
    "arguments": {
      "credential": "ITEM-EXAMPLE-01",
      "intents": [
        "http_request"
      ],
      "hosts": [
        "api.example.com"
      ],
      "paths": [
        "/v1/*"
      ],
      "methods": [
        "GET"
      ],
      "reason": "Read the deploy status for this project",
      "ttl_seconds": 3600
    }
  }
}

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

{
  "structuredContent": {
    "outcome": "approval_required",
    "detail": "REQ-EXAMPLE-01",
    "request": "REQ-EXAMPLE-01",
    "state": "pending",
    "credential": "ITEM-EXAMPLE-01",
    "intents": [
      "http_request"
    ],
    "ttl_seconds": 3600,
    "disclose": false,
    "decide_by": 1767225600
  },
  "isError": false
}

Then check with { "request": "REQ-EXAMPLE-01", "wait_seconds": 30 }. Once approved the receipt says state: approved and carries grant with its id, expires_at, project_root and hosts.

From the command line

bpw agent request_access --credential ITEM-EXAMPLE-01 --intent http_request --host api.example.com --path '/v1/*' --reason 'Read the deploy status for this project'

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.
requeststringThe request ID. Pass it back as request to check the decision.
statestringWhere the request stands. One of pending, approved, denied, expired.
credentialstringThe credential the result is about. For a request made with looking_for, absent until the request is approved.
looking_forstringFor a request made by description: the description, as sent. The item the person chose is named only once the request is approved.
environmentstringFor an environment access request: the target ORG:ENV scope (IDs only, never values).
onlyarrayFor an environment access request: the restricted list of variable names asked for or granted (names only, never values).
intentsarrayThe intents asked for, or granted.
ttl_secondsintegerThe grant's lifetime in seconds: as asked while pending, as granted once approved.
disclosebooleanWhether the grant lets code the agent runs read the value.
decide_byintegerUnix time after which a pending request expires.
grantobjectOnce approved: the grant's id, expires_at (Unix time), project_root and the hosts it names.

Outcomes it can return

  • approval_required: request_access recorded the ask and is waiting for the person.
  • approved: The person approved the ask.
  • denied: The person declined the ask.
  • expired: The ask waited 10 minutes without a decision and lapsed.
  • request_limited: request_access is rate limited per client, per session and per daemon, and after three denials in a session every ask answers this.
  • 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

  • The person may shorten the lifetime, drop hosts or take disclosure off; the receipt says what was granted. A new grant replaces any grant the credential already has.
  • Lifetimes run from 60 seconds to 7 days (default one hour). Longer grants are made by the person with bpw grant add.
  • Too many asks answer request_limited, and after three denials in one session every ask does.
  • An ask is refused for a login password to a host outside its saved site, for a TOTP or passkey item to any host, and for a header APIs do not read credentials from.

Tool description

Status: rotate is partly built.

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

Asks the person, in BotPassword's own app, for a grant on one credential, named by its reference (credential) or, when you have none, described in one line (looking_for) so that the person chooses the item: the intents (run_with and/or http_request, or rotate alone), the scope the grant needs (hosts, paths and methods for http_request; commands or argv rules for run_with, with hosts for a sealed run, or disclose to let the command read the value), a lifetime and a one-line reason. An agent cannot grant access itself. The result is a receipt: approval_required with a request ID while the person decides, then the decision in state: the grant (its ID, expiry, project root and hosts), a denial, or expiry. Check it later with request (and wait_seconds to wait up to 30 seconds). The grant is bound to this session's project, may be shorter than asked, may name fewer hosts or take disclosure off (the receipt says what was granted), and replaces any grant the credential has. A described ask's receipt names the item (credential) only once the grant is made; list_credentials then shows it. Too many asks answer request_limited, and after three denials in a session every ask does. This tool never accepts or returns secret values. The result is a typed outcome such as success, vault_locked or scope_denied.

Status: rotate is partly built.

Status: rotate is partly built.

  • list_credentials: lists the credentials this agent client holds grants for, with each one's reference, kind, title, site and the intents its grant allows.
  • run_with: runs a command with granted credentials injected by BotPassword and returns the exit status and output.
  • http_request: sends one HTTPS request with a granted credential injected by BotPassword, after checking the origin, path and method against the grant.
  • rotate (partly built): rotates a granted credential at its provider and stores the new revision: create a new key, store it as pending, verify it, promote it, then revoke the old one after a grace period.
  • Intent catalog, MCP server, Grants and approvals

Status: rotate is partly built.