diff --git a/browsers/webmcp.mdx b/browsers/webmcp.mdx index 8e8755cb..7b9d731a 100644 --- a/browsers/webmcp.mdx +++ b/browsers/webmcp.mdx @@ -236,6 +236,10 @@ HTTP 200 doesn't always mean the action is complete. Check `status`: `output` and `error_text` are optional. The output shape depends on the tool, except for the populated-form result below. + + 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. + + ## Handle a populated form For a declarative form without autosubmit, invocation can return: diff --git a/vaults/credentials.mdx b/vaults/credentials.mdx index 5a2aff9b..dafcee11 100644 --- a/vaults/credentials.mdx +++ b/vaults/credentials.mdx @@ -1,6 +1,6 @@ --- title: "Credential Items" -description: "Collect and update encrypted credentials, then fill selected fields in a vault-attached browser" +description: "Collect and update encrypted credentials, then use them in a vault-attached browser session" --- 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 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. -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. +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. ## Define an item @@ -256,6 +256,18 @@ invoke the advertised `collect` operation to reopen collection for a ready item. 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. +## Use a credential with WebMCP + +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: + +1. attach the vault to the browser and [discover the tool](/browsers/webmcp#discover-tools). +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. +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. + + + unlike `fill`, a WebMCP tool may submit or have other side effects. + + ## Read and update values `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.