Skip to content

Commit 56bc212

Browse files
authored
Document vault credential use with WebMCP tools (#666)
* Document vault credential bindings for WebMCP tools * Clarify credential WebMCP invocation steps * Move credential WebMCP tip and trim guidance --------- Co-authored-by: rgarcia <72655+rgarcia@users.noreply.github.com>
1 parent 37464a2 commit 56bc212

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

‎browsers/webmcp.mdx‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,10 @@ HTTP 200 doesn't always mean the action is complete. Check `status`:
236236

237237
`output` and `error_text` are optional. The output shape depends on the tool, except for the populated-form result below.
238238

239+
<Tip>
240+
To pass credential fields without putting their values in the tool input, use a [credential item's `webmcp_invoke` operation](/vaults/credentials#use-a-credential-with-webmcp) instead of calling the browser's invoke endpoint directly.
241+
</Tip>
242+
239243
## Handle a populated form
240244

241245
For a declarative form without autosubmit, invocation can return:

‎vaults/credentials.mdx‎

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Credential Items"
3-
description: "Collect and update encrypted credentials, then fill selected fields in a vault-attached browser"
3+
description: "Collect and update encrypted credentials, then use them in a vault-attached browser session"
44
---
55

66
use a `credential` item for usernames, passwords, totp generators, and other non-payment credentials. it belongs directly to a [vault](/vaults/overview); you don't need a wallet or an external credential provider. credential items power the [Fill from Vault](/auth/fill-from-vault) path under Auth.
@@ -9,7 +9,7 @@ use a `credential` item for usernames, passwords, totp generators, and other non
99
use `wallet` and `card` items for credit card numbers, security codes, and expiration dates. don't store, collect, or fill payment-card data through credential items.
1010
</Warning>
1111

12-
credential items store values and support explicit [browser fill](/vaults/fill). your application or agent still handles navigation, submission, and the site's response. choose [Managed Auth](/auth/managed-auth) instead when you want KERNEL to run login flows and maintain authenticated sessions.
12+
credential items support [browser fill](/vaults/fill) for ordinary forms and `webmcp_invoke` for [WebMCP tools](/browsers/webmcp). `fill` doesn't submit; a WebMCP tool may submit or have other side effects. choose [Managed Auth](/auth/managed-auth) instead when you want KERNEL to run login flows and maintain authenticated sessions.
1313

1414
## Define an item
1515

@@ -256,6 +256,18 @@ invoke the advertised `collect` operation to reopen collection for a ready item.
256256

257257
the form includes text, email, and password fields in declaration order, not totp. it renders `label` when present and falls back to `name`. non-sensitive values can be prefilled; stored secrets aren't revealed. required visible inputs must be populated on submission.
258258

259+
## Use a credential with WebMCP
260+
261+
when a ready KERNEL-hosted credential advertises `webmcp_invoke` in `available_operations`, you can bind its fields to a live WebMCP tool instead of locating form selectors:
262+
263+
1. attach the vault to the browser and [discover the tool](/browsers/webmcp#discover-tools).
264+
2. build public `input` with an existing `null` at each slot to fill. map each credential field to a slot using a unique rfc 6901 `input_path`, such as `/password`. don't put credential values in `input`. a totp binding supplies a fresh code, not the seed.
265+
3. invoke the item's `webmcp_invoke` operation with the browser session id, live `tool_ref`, exact `source.page_url`, `input`, and `bindings`. KERNEL replaces the null slots when it invokes the tool. inspect the status and page afterward; completion doesn't prove the site accepted the action.
266+
267+
<Warning>
268+
unlike `fill`, a WebMCP tool may submit or have other side effects.
269+
</Warning>
270+
259271
## Read and update values
260272

261273
`spec.fields` contains ordered definitions, including optional labels, but never initial values. `state.fields` remains keyed by stable field `name` and reports `has_value` for each field. it also returns `value` when the field is populated and `sensitive: false`. sensitive values aren't returned.

0 commit comments

Comments
 (0)