# Agent tools

The Provenance MCP tools an agent's API key lists, their snake_case arguments, idempotency keys, structured results and errors, and the tools that need no key.

An agent connects to Provenance MCP with an API key and lists the tools its key's products allow. The same tools run in the `@provenanceauth/mcp-server` package over stdio ([connect a client](https://provenanceauth.com/docs/provenance-mcp/connect.md)).

## Tools

| Tool | What it does | Key product | Changes data |
| --- | --- | --- | --- |
| `authorize_action` | Mints an intent token for an action the agent is about to take | Mandate | Yes |
| `verify_intent` | Verifies a token before the action runs | Mandate | Yes |
| `get_approval_status` | Reads a step-up approval, waiting up to `wait` seconds (25 at most) for the decision | Mandate | No |
| `revoke_intent` | Revokes a token, a session or a device | Mandate | Yes |
| `request_grant` | Asks a person for a [network grant](https://provenanceauth.com/docs/mandate/concepts/network-grants.md) and returns the `grant_url` to show them | Mandate | Yes |
| `buy_under_grant` | Buys one cart under a network grant, or returns the `approve_url` for an order outside its limits | Mandate | Yes |
| `answer_call_challenge` | Registers an outgoing call against a business's challenge code | Mandate | Yes |
| `verify_caller` | The verdict on an incoming call, with a one-line `summary` | Authorize | No |
| `request_caller_confirmation` | Asks the person behind a verified call to confirm a request while the call holds | Authorize | Yes |
| `verify_media` | Reads an Attest claim's provenance and risk score, or verifies a stored attestation | Attest | No |
| `assess_action` | Runs Trace rules before a tool runs: allow, challenge or deny | Trace | Yes |
| `docs_search` | Searches the docs and returns the best passages; a result's `url` reads the page | Any | No |
| `start_exchange`, `list_proposals`, `accept_proposal` and the other [exchange tools](https://provenanceauth.com/docs/provenance-mcp/exchange-tools.md) | Ask for something, compare proposals, accept or decline them, and read the shared record | Mandate | Some |
| `api_search`, `api_read`, `api_write` | Find any public API operation, then read or write with the key's own scopes. Opt in with `?toolsets=api`. A live write needs an `idempotency_key` and the person's confirmation; console-only settings (keys, webhook endpoints, members, billing) are refused | Any | `api_write` yes |

The hosted server lists a tool only for a key that holds its product: an Attest-only key sees `verify_media` and `docs_search`. Each tool runs under the key's scopes, plan and rate limits.

### Arguments

| Tool | Arguments |
| --- | --- |
| `authorize_action` | `action_description`, `agent_session_id`, `device_id`; optionally `action_payload`, `grant_token`, `context`, `trace_id`, `approval` |
| `verify_intent` | `intent_token`, `action_description`; optionally `action_payload`, `context`, `trace_id` |
| `get_approval_status` | `approval_id`; optionally `wait` |
| `revoke_intent` | One of `intent_token`, `jti`, `agent_session_id` or `device_id`; optionally `reason` |
| `request_grant` | `agent_id`, `proposed` (`max_amount` and `budget_amount` in minor units, `budget_window`, `currency`, `allowed_stores`, `blocked_stores`, `expires_at`); optionally `return_url` |
| `buy_under_grant` | `network_grant`, `order`, `aud`; optionally `approval_id` |
| `answer_call_challenge` | `code`, `purpose`; optionally `grant` or `approval`, `purpose_text`, `credential` |
| `verify_caller` | Optionally `code`, `challenge`, `check_id`, `wait` |
| `request_caller_confirmation` | `check_id`, `action_type`, `description`; optionally `amount`, `currency`, `answer_within` |
| `verify_media` | Exactly one of `claim_id` or `attestation_id` |
| `assess_action` | `tool`; optionally `risk`, `amount`, `currency`, `payee`, `description`, `trace_id`, `agent_id`, `agent_session_id`, `untrusted_sources`, `findings` |

Amounts are integers in minor units: `4999` is 49.99 USD. Each tool's `inputSchema` describes every argument with an example.

## The tool contract

Every tool keeps the same rules:

- **snake_case arguments.** An argument the tool doesn't know is refused before the tool runs, with a tool error that names it.
- **An idempotency key on every write.** A tool that changes data takes an optional `idempotency_key`, sent to the API as `Idempotency-Key`. Repeat a call with the same key and the first result comes back; left out, one is generated and returned in the result.
- **Structured results.** Every result has `structuredContent`, the API's snake_case response, described by the tool's `outputSchema`. The text is a one-line outcome, then the same object as JSON.
- **Structured errors.** An error result has `isError: true` and an error object, in the text and in `_meta["com.provenanceauth/error"]`, never in `structuredContent`.
- **Annotations.** Every tool sets all four MCP annotations (read-only, destructive, idempotent and open-world hints). `revoke_intent` is the one destructive tool.

An error object looks like this:

```json
{
  "type": "invalid_request_error",
  "code": "insufficient_scope",
  "message": "This key doesn't have the mandate scope.",
  "doc_url": "https://www.provenanceauth.com/docs/platform/errors#insufficient_scope",
  "request_id": "req_01JQ7Z8X3M2N4P5R6S7T8V9W0X"
}
```

It can also carry `param`, the argument at fault, and `retry_after_seconds` when the call was rate limited. After a rate limit or a server error, repeat the same call with the same `idempotency_key`.

## When a person must decide

If your [policy](https://provenanceauth.com/docs/concepts/policies.md) sends the action for approval, `verify_intent` returns a normal result with `status: "awaiting_approval"` and the `approval_id`, instead of hanging. Call `get_approval_status` with that `approval_id` and `wait`, or call `verify_intent` again with the same token once the person approves.

Ask in plain language, for example:

```text
Authorize paying invoice INV-2041 for $450 to Brindlecote Supplies, then verify it.
```

When a store answers the agent's checkout with a `ProvenanceIntent` challenge, the agent calls `authorize_action` with the challenge's binding as `action_payload` and `approval` (with the store origin as `merchant_origin`). The tool returns `awaiting_approval` until the person approves, then a fresh token for the `Provenance-Intent` header. See [the ProvenanceIntent challenge](https://provenanceauth.com/docs/authorize/concepts/approval-challenge.md).

### Approve from the MCP client

When your MCP client supports URL-mode elicitation, the person approves without the agent polling. The client declares `elicitation: { url: {} }` in its capabilities, and when `verify_intent` needs a person the server sends an `elicitation/create` request with the action description and a link to the approval page:

```json
{
  "mode": "url",
  "elicitationId": "elc_01JQ7Z8X3M2N4P5R6S7T8V9W0X",
  "url": "https://app.provenanceauth.com/approve/Xq3…",
  "message": "Approve in Provenance: Pay invoice INV-2041: $450.00 to Brindlecote Supplies"
}
```

The client shows the link, and the person decides on the approval page, with a passkey, face or fingerprint where your policy asks for one. The tool call waits, sends `notifications/elicitation/complete` when the person decides, and returns the verify result. If the person dismisses the link or the wait ends first, the call returns `awaiting_approval`. The payload never goes into the elicitation.

A 2026-07-28 client that declared URL elicitation gets `"resultType": "input_required"` instead of a waiting stream. `inputRequests.approval` holds the approval link, and `requestState` is a single-use reference the server keeps for 10 minutes. Send the same call again with that `requestState` and `inputResponses` (`{ "approval": { "action": "accept" } }`); while the person is still deciding, the answer is `input_required` again with a new `requestState`.

## Tools that need no key

These tools need no API key and no sign-in. Add `?toolsets=verify` to the server's address to list only them, or start the stdio package without `PROVENANCE_API_KEY`.

| Tool | What it does |
| --- | --- |
| `check_counterparty` | Takes a `domain`; returns whether the business has a verified profile, the rails it accepts, the amount above which a person approves, and its responding agents with their key ids |
| `find_counterparties` | Takes a `category`, and optionally `sells_to_agents` and `limit`; returns businesses that sell to agents, ordered by name |
| `request_checkout_approval` | Takes a store's `approve_url`, `challenge` or `ucp_checkout`; returns the link, the cart in one line and the expiry. With `wait` (25 seconds at most) it waits for the person's decision and returns `status` and, once approved, `intent_token` |
| `get_exchange` | Reads the shared view of an exchange your origin is in, after you sign in with your website key ([read an exchange with no account](https://provenanceauth.com/docs/provenance-mcp/exchange-tools.md#read-an-exchange-with-no-account)) |
| `verify_proof` | Checks an exchange head, authority proof, intent token, proposal or delivery against published keys |

The checkout tool reads only the request in that link, and tells the model to show the link as it is and never to open it or approve for the person. See [ask your own customer](https://provenanceauth.com/docs/authorize/guides/ask-your-own-customer.md) and [find a business](https://provenanceauth.com/docs/authorize/guides/find-a-business.md). A business that runs the stdio package for its own agents passes `profileUrl` to `createProvenanceMcpServer`, and the server's instructions name its signed profile.

## Act under a grant another agent handed over

An agent that hands your agent a grant over MCP puts it in the `tools/call` request's `_meta`, under `com.provenanceauth/grant`:

```json
{
  "method": "tools/call",
  "params": {
    "name": "authorize_action",
    "arguments": { "action_description": "Hold seat 14C on TP1351", "agent_session_id": "sess_seats_1", "device_id": "dev_00000000000000000000000000000001" },
    "_meta": { "com.provenanceauth/grant": { "grant_token": "eyJhbGciOiJFUzI1NiIsInR5cCI6Im1hbmRhdGUrand0Ii…", "handoff_id": "xho_…" } }
  }
}
```

`authorize_action` acts under that grant when the arguments carry no `grant_token`. The grant rides apart from the arguments the model fills in and from the transport's credentials. The earlier key, `provenanceauth.com/grant`, is still read for 12 months from the release that introduced `com.provenanceauth/grant`; when a request carries both, the new key wins. `withMcpGrant` in `@provenanceauth/rails/mcp` writes the new key.

A grant handed outside an account is bound to the receiving agent's key, so start the stdio package with that key as `PROVENANCE_HOLDER_KEY` (a P-256 private JWK, as JSON): the server signs the DPoP proof each use needs, and the key never reaches the model. A tool server of your own checks a grant it receives with `acceptMcpGrant` from `@provenanceauth/rails/mcp`. See [hand off to outside agents](https://provenanceauth.com/docs/mandate/guides/hand-a-grant-to-an-outside-agent.md).

## Errors

| Symptom | Cause | Fix |
| --- | --- | --- |
| Only the keyless tools are listed | No key was sent, or the address has `?toolsets=verify` | Send the key, or remove `?toolsets=verify`. |
| A tool error naming an argument | The argument is misspelled, missing or unknown | Arguments are snake_case, such as `action_description`. |
| [`insufficient_scope`](https://provenanceauth.com/docs/platform/errors.md#insufficient_scope) | The key lacks the product the tool needs | Use a key with the tool's product. |
| [`dpop_proof_required`](https://provenanceauth.com/docs/platform/errors.md#dpop_proof_required) from `authorize_action` | The grant is bound to a key and the server has no `PROVENANCE_HOLDER_KEY` | Start the stdio package with the receiving agent's holder key. |
| [`rate_limit_exceeded`](https://provenanceauth.com/docs/platform/errors.md#rate_limit_exceeded) | Too many calls | Wait `retry_after_seconds`, then repeat the call with the same `idempotency_key`. |
| `400` with code `-32602` naming `requestState` | The `requestState` expired, was already used, or belongs to another call | Send the call again without `requestState` for a fresh one. |

## Related

- [Connect a client](https://provenanceauth.com/docs/provenance-mcp/connect.md)
- [Framework integrations](https://provenanceauth.com/docs/mandate/guides/framework-integrations.md): put Authorize in front of your own tools instead.
- [Step-up approval](https://provenanceauth.com/docs/mandate/guides/step-up-approval.md)
- [Traced inference](https://provenanceauth.com/docs/trace/guides/traced-inference.md), for `trace_explain_decision` among the [developer tools](https://provenanceauth.com/docs/provenance-mcp/developer-tools.md)
