Tarsk Plugins

Use Widget

Mount an external WebMCP widget in the chat and use the client-side tools it exposes. Use when the user (or another skill/prompt) asks to use a widget at a given URL to display or do something, for example "Use widget at <url> to display the weather for a zip code".

Source: /skills/use-widget/SKILL.md

Use Widget (WebMCP)

Mount a WebMCP widget by URL in the widget panel (right side of chat), discover the tools it exposes, and invoke them. The widget runs client-side in the browser and exposes its tools via document.modelContext; Tarsk talks to it over postMessage.

Widgets appear in a resizable panel to the right of the chat (similar to dual chat). The chat stream shows a compact "opened widget" row; the iframe renders in the panel.

When to use

Use this when a prompt or the user references a widget URL and a task to perform with it, such as:

Use widget at https://tarsk-webmcp-weather.netlify.app/ to display the weather for a zip code specified by the user.

Tools

  • open_widget({ url, title? }) — Mounts the widget and returns the list of tools it exposes (each with name, description, and inputSchema). Always call this first.
  • call_widget_tool({ url, tool, input }) — Invokes one of the discovered tools. The url must match the one passed to open_widget; tool is a tool name from the discovery result; input must satisfy that tool's inputSchema.

Workflow

  1. Call open_widget with the URL. Read the returned tool list to learn what is available and what inputs each tool needs.
  2. Gather any required arguments from the user (for example, ask for a zip code if one was not provided).
  3. Call call_widget_tool with the chosen tool and arguments. The widget renders the result inline, and the tool result text is returned to you.

Worked example: weather by zip code

  1. open_widget({ url: "https://mcp.tarsk.io/weather/" })
    • Returns a tool like: get-weather — "Get current weather for a US zip code", inputSchema: { type: "object", properties: { zipcode: { type: "string" } }, required: ["zipcode"] }
  2. If the user gave a zip code (e.g. 94107), call it. Otherwise ask for one.
  3. call_widget_tool({ url: "https://tarsk-webmcp-weather.netlify.app/", tool: "get-weather", input: { zipcode: "94107" } })
    • The widget displays the weather in the widget panel and returns the result text.

Notes

  • Use the exact tool name strings returned by open_widget; do not invent tools.
  • Pass the same url to both tools so call_widget_tool reaches the mounted widget.
  • Only https widget URLs are supported. The widget must implement the WebMCP postMessage bridge (getTools / callTool).