> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mcpjam.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Test a widget

> Open the Excalidraw widget in fullscreen, draw in it, and check the tool input and result behind it. About 5 minutes.

An MCP App tool can return a widget: an interactive view rendered in the chat. In this tutorial you use the Excalidraw widget the way a user would, then check the data that produced it.

## Before you start

This tutorial picks up where [Chat and inspect tool calls](https://docs.mcpjam.com/inspector/playground.md) ends. If you came here directly, connect the Excalidraw demo server as in [Start testing](https://docs.mcpjam.com/index.md#start-testing), open **Playground**, and send `Draw a rectangle with the text Hello inside it.`

Use any pane that shows the **Hello** rectangle. The screenshots use Claude. If no pane shows a widget, follow [Compare clients](https://docs.mcpjam.com/inspector/playground/compare-hosts.md#compare-the-arguments) to check which tools the models called.

The steps use the Excalidraw widget: the **Hello** rectangle, its canvas, and the `create_view` tool. With your own server, the widget toolbar, **Edit input & output**, and [If the widget is blank](#if-the-widget-is-blank) work the same, but your widget's content and tool names differ.

### 1. Find the widget toolbar

In a pane that shows the **Hello** rectangle, find the row of icons above the rectangle. This is the widget toolbar.

![The Hello rectangle in the Claude pane with the widget toolbar above it](https://mintcdn.com/mcpjam/rRT_7jrEtrJ2bEz-/images/playground/v1/widget-claude.png?fit=max\&auto=format\&n=rRT_7jrEtrJ2bEz-\&q=85\&s=8aa2662163545743b3ce4049df38662d)

From left to right, the icons are **Inline**, **PiP**, **Fullscreen**, **Data**, **Sandbox**, and **Edit input & output**. Hover an icon to see its name. Some widgets add **Model Context** (MCP Apps) or **Widget State** (ChatGPT Apps) after **Data**.

### 2. Open the widget in fullscreen

Select **Fullscreen**.

The widget fills the window: the Excalidraw toolbar is at the top, **Open in Excalidraw** at the top right, and the **Hello** rectangle in the middle.

![The Excalidraw widget in fullscreen: a bar titled App with a close button at the top right, the Excalidraw toolbar, and the Hello rectangle in the center](https://mintcdn.com/mcpjam/rRT_7jrEtrJ2bEz-/images/playground/v1/fullscreen.png?fit=max\&auto=format\&n=rRT_7jrEtrJ2bEz-\&q=85\&s=8eecf6cd3ae2f97624b5d4071bd137a2)

### 3. Draw a second rectangle

Press **R** to pick the rectangle tool, then drag on an empty part of the canvas.

A new, empty rectangle appears where you dragged. It is selected, and a style panel opens on the left with **Stroke**, **Background**, and other options.

![The fullscreen widget after drawing: a new selected rectangle below the Hello rectangle and the style panel on the left](https://mintcdn.com/mcpjam/rRT_7jrEtrJ2bEz-/images/playground/v1/widget-new-rectangle.png?fit=max\&auto=format\&n=rRT_7jrEtrJ2bEz-\&q=85\&s=f168dd97a7915c3e22be72519e016fe0)

To leave fullscreen, at the right end of the bar at the top of the window, select **Exit fullscreen** (**×**).

### 4. Check the tool input and result

Back in the same pane, select **Edit input & output**. Two JSON editors open. They show the original `create_view` call from your prompt, not the rectangle you just drew. Your drawing doesn't change them, because the widget keeps its own state.

* **INPUT** is the argument the model sent to `create_view`. Check that the `elements` string contains a rectangle whose `label` text is `Hello`. If the original **Hello** rectangle looks wrong, this is the first place to look.
* **RESULT** is what the server returned. In the example run, under `_meta`, `ui/resourceUri` is `ui://excalidraw/mcp-app.html`, the widget the pane rendered.

When you are done, select **Done editing**.

## If the widget is blank

1. Look at the **Sandbox** icon. If it shows a number, the sandbox blocked requests. Select **Sandbox** and start with **Findings**.
2. Check that the tool declares a widget. In the left rail, select the tool under **Tools** and open **Metadata**: it should have `ui` → `resourceUri` (or the older `ui/resourceUri`) with a `ui://` URI. Without it, the client has no widget to render.
3. In the JSON-RPC log, select the **Apps** filter and check that the widget sent `ui/initialize` and received `ui/notifications/tool-result`.

## Next

[Compare clients](https://docs.mcpjam.com/inspector/playground/compare-hosts.md) to see how the same prompt plays out in each pane.

## Related

* [Playground reference](https://docs.mcpjam.com/inspector/playground/reference.md#widgets): the widget toolbar and the Sandbox panel.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.