Variable McpUiUpdateModelContextRequestSchemaConst
McpUiUpdateModelContextRequestSchema: ZodObject<
{
method: ZodLiteral<"ui/update-model-context">;
params: ZodObject<
{
content: ZodOptional<
ZodArray<
ZodUnion<
readonly [
ZodObject<
{
_meta: ZodOptional<(...)>;
annotations: ZodOptional<(...)>;
text: ZodString;
type: ZodLiteral<(...)>;
},
$strip,
>,
ZodObject<
{
_meta: ZodOptional<(...)>;
annotations: ZodOptional<(...)>;
data: ZodString;
mimeType: ZodString;
type: ZodLiteral<(...)>;
},
$strip,
>,
ZodObject<
{
_meta: ZodOptional<(...)>;
annotations: ZodOptional<(...)>;
data: ZodString;
mimeType: ZodString;
type: ZodLiteral<(...)>;
},
$strip,
>,
ZodObject<
{
_meta: ZodOptional<(...)>;
annotations: ZodOptional<(...)>;
description: ZodOptional<(...)>;
icons: ZodOptional<(...)>;
mimeType: ZodOptional<(...)>;
name: ZodString;
title: ZodOptional<(...)>;
type: ZodLiteral<(...)>;
uri: ZodString;
},
$strip,
>,
ZodObject<
{
_meta: ZodOptional<(...)>;
annotations: ZodOptional<(...)>;
resource: ZodUnion<(...)>;
type: ZodLiteral<(...)>;
},
$strip,
>,
],
>,
>,
>;
structuredContent: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
},
$strip,
>;
},
$strip,
> = ...
Description
Request to update the agent's context without requiring a follow-up action (Guest UI -> Host).
Unlike
notifications/messagewhich is for debugging/logging, this request is intended to update the Host's model context. Each request overwrites the previous context sent by the Guest UI. Unlike messages, context updates do not trigger follow-ups.The host will typically defer sending the context to the model until the next user message (including
ui/message), and will only send the last update received.See
app.App.updateModelContext for the method that sends this request