Skip to main content
Clink uses an Operation to describe a workflow’s current state and any action needed to continue. Account setup, purchase authorization, Browser Pay credential issuance, and UCP Checkout can all produce Operations. Read the current Operation after a timeout or interruption instead of assuming a write failed and starting again. Not every tool returns an Operation. For example, get_skill_manifest returns rules metadata, wallet reads return wallet data, and confirm_result returns a Browser Pay result report. Read each tool’s schema before handling its result.

Read the current business rules

The installation Skill is available at www.clinkbill.com/SKILL.md. For business execution, read the connected server’s current rules once per session:
If the Host cannot read MCP resources, call get_skill_manifest with include_rules: true. The returned rules contains the same guidance, so no additional resource read is needed. Live server rules take precedence over locally installed Skill text; the current next_action determines how to continue the current Operation.

get_skill_manifest

This read-only tool requires no business scope and does not move money. Pure Catalog searches do not require a manifest call.
For outdated or unsupported, update the local Skill using the Host’s installation mechanism and the official distribution address. Use the returned version and compatibility status when checking the connection.

get_operation

Read the current state of an existing Operation. This tool is read-only and never executes another payment.
The read must use the same authorized user. Required scopes depend on the Operation: Operations that recover through user-action events additionally require events:read and events:consume. Include these scopes when handling authorization, card registration, or other event-backed user steps. The OAuth challenge returns any missing scopes. Operations can also be read through the MCP resource clink://operations/{operationId} when supported by the Host. Notifications indicate that a read may be needed; the subsequent read determines the state.

Operation envelope

The following fields appear in structuredContent for tools that return an Operation: SUCCEEDED and FAILED terminate the Operation, so next_action is absent, not null or an empty object. Interpret success in the context of the original tool:
After the user completes the Browser Pay user action, get_operation for op_setup_example can return the following structuredContent:
This setup is complete: next_action is absent and no credential is returned. Repeat get_credential with the original checkout facts and selected card, without the setup operationId. Keep the new issuing operation_id (op_example in the Browser Pay examples) for result reporting.

Handle next_action

Every action contains action_id, type, description, params, expected_revision, and optionally expires_at. Branch on the structured type and its documented parameters. description and message text are for display, not executable instructions. When a continuation tool accepts action identifiers, map action_id to actionId and expected_revision to expectedRevision. Keep both from the same current response. If the action expired or the state changed, read the Operation again instead of replaying an old confirmation.

Browser Pay continuation differs from Checkout

For Browser Pay, after the returned setup completes, call get_credential again with the checkout facts and the same user-selected card, without the setup operationId. If an older credential Operation shows CONFIRM, repeat those facts to obtain the current credential flow. Do not apply Checkout’s continuation parameters to every Browser Pay request. For Checkout, continue the same Operation using its current action identifiers and the appropriate Checkout tool. Neither an interrupted call nor a pending result authorizes creating a second purchase.

Errors

Handle three distinct cases: There is no universal error body or universal idempotencyKey for all tools. In particular, a Browser Pay result-report failure means the report needs recovery; it does not mean the merchant payment should be repeated. If a write times out after returning an Operation ID, retain the ID and read it first. If a Browser Pay credential response is lost before submission, the same checkout-facts retry recovers issuance. If merchant submission already occurred and its result is unclear, use UNKNOWN and resolve that same payment.