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

# MCP widgets

> The MCP-context widgets — elicitation forms and structured-output rendering.

The MCP-context widgets — elicitation forms and structured-output rendering.

## ElicitationForm

```ts theme={null}
function ElicitationForm(props: ElicitationFormProps): ReactNode
```

Render the elicit message + a schema-driven answer form. On submit the answer
is validated against the schema; on success `onSubmit` receives the typed
value, otherwise the per-field errors surface and nothing is emitted.

**Props**

| Prop           | Type                        | Description                                               |
| -------------- | --------------------------- | --------------------------------------------------------- |
| `busy?`        | `boolean`                   | Disables submission while an answer is in flight.         |
| `message`      | `string`                    | The elicit request's human-readable message.              |
| `onCancel?`    | `() => void`                | Optional cancel affordance (UI only; not an MCP decline). |
| `onSubmit`     | `(answer: unknown) => void` | Called with the validated answer when the human submits.  |
| `schema`       | `JsonSchema`                | The elicit `requestedSchema` — the answer's form schema.  |
| `submitLabel?` | `string`                    | —                                                         |

**Related:** [ElicitationFormProps](/reference/studio-sdk/mcp-widgets#elicitationformprops)

## ElicitationFormProps

```ts theme={null}
interface ElicitationFormProps
```

**Properties**

| Property       | Type                        | Description                                               |
| -------------- | --------------------------- | --------------------------------------------------------- |
| `busy?`        | `boolean`                   | Disables submission while an answer is in flight.         |
| `message`      | `string`                    | The elicit request's human-readable message.              |
| `onCancel?`    | `() => void`                | Optional cancel affordance (UI only; not an MCP decline). |
| `onSubmit`     | `(answer: unknown) => void` | Called with the validated answer when the human submits.  |
| `schema`       | `JsonSchema`                | The elicit `requestedSchema` — the answer's form schema.  |
| `submitLabel?` | `string`                    | —                                                         |

**Related:** [JsonSchema](/reference/studio-sdk/schema-forms#jsonschema)

## StructuredOutput

```ts theme={null}
function StructuredOutput(props: StructuredOutputProps): ReactNode
```

Render `content` through `schema`. An object schema drives a labeled,
ordered field list (each value shown with a `JsonTree`); anything else — no
schema, a non-object schema, or content that is not a matching object —
renders the raw content through a single `JsonTree`.

**Props**

| Prop      | Type         | Description                                    |
| --------- | ------------ | ---------------------------------------------- |
| `content` | `unknown`    | The `structured_content` the tool returned.    |
| `schema?` | `JsonSchema` | The tool's declared MCP output schema, if any. |

**Related:** [StructuredOutputProps](/reference/studio-sdk/mcp-widgets#structuredoutputprops)

## StructuredOutputProps

```ts theme={null}
interface StructuredOutputProps
```

**Properties**

| Property  | Type         | Description                                    |
| --------- | ------------ | ---------------------------------------------- |
| `content` | `unknown`    | The `structured_content` the tool returned.    |
| `schema?` | `JsonSchema` | The tool's declared MCP output schema, if any. |

**Related:** [JsonSchema](/reference/studio-sdk/schema-forms#jsonschema)
