A sticky board powered by AI. Tools register and unregister dynamically based on what's on the board.
| 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. |
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. Restrict the returned tools to those registered by (or exposed from) the listed origins. 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. |