https://ideaboard.app/workspace
No stickies yet. Ask an agent with WebMCP tool-calling access to "brainstorm and add ideas about <> to board."
1 tool

Imperative WebMCP API Reference

Option Type Description
registerTool(tool, options) — tool properties
name String Unique identifier for the tool. Letters, digits, hyphens, underscores, and dots. Max 128 characters.
description String Human-readable description of what the tool does. Helps the agent decide when and how to use it.
title String Optional. Friendly display name shown in UIs (the agent uses name for invocation).
inputSchema Object JSON Schema describing the input parameters the tool accepts. See json-schema.org.
annotations Object Optional hints for the agent.
  • readOnlyHint: true means the tool doesn’t mutate state.
  • untrustedContentHint: true means the tool’s output may contain untrusted content.
  • consequentialHint: true indicates an action with significant consequences, such as making a payment.
Omitted hints default to false when an annotations object is supplied.
execute Function Called when the agent invokes the tool. Receives an object matching inputSchema and an options object whose signal is aborted if the invocation is canceled. Can be sync or async. Return value is sent back to the agent.
registerTool(tool, options) — options properties
signal AbortSignal Optional. Pass an AbortController.signal to later unregister the tool by calling controller.abort().
exposedTo Array<String> Optional. Origins (e.g. "https://example.com") that an iframe wants to share this tool with. Use to bubble a tool up from a cross-origin iframe to its parent document.
Discovering tools — document.modelContext.getTools(options?)
fromOrigins Array<String> Optional. Include tools from the listed origins if they are exposed to the calling document, in addition to same-origin tools. An omitted or empty list returns only same-origin tools. Returns a Promise<RegisteredTool[]>.
Unregistering tools
AbortController Object Create a controller, pass controller.signal to registerTool(). Call controller.abort() to unregister the tool at any time.