Skip to content

Commit 0b4b13c

Browse files
antonpk1claude
andcommitted
chore: regenerate schemas for McpUiToolMeta types
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 8fe8977 commit 0b4b13c

File tree

3 files changed

+74
-32
lines changed

3 files changed

+74
-32
lines changed

src/generated/schema.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3796,6 +3796,34 @@
37963796
"required": ["method", "params"],
37973797
"additionalProperties": false
37983798
},
3799+
"McpUiToolMeta": {
3800+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3801+
"type": "object",
3802+
"properties": {
3803+
"resourceUri": {
3804+
"description": "URI of UI resource for rendering tool results.",
3805+
"type": "string"
3806+
},
3807+
"visibility": {
3808+
"description": "Who can access this tool. Default: [\"model\", \"apps\"]\n- \"model\": Tool visible to and callable by the agent\n- \"apps\": Tool callable by apps from this server only",
3809+
"type": "array",
3810+
"items": {
3811+
"description": "Tool visibility scope - who can access the tool.",
3812+
"anyOf": [
3813+
{
3814+
"type": "string",
3815+
"const": "model"
3816+
},
3817+
{
3818+
"type": "string",
3819+
"const": "apps"
3820+
}
3821+
]
3822+
}
3823+
}
3824+
},
3825+
"additionalProperties": false
3826+
},
37993827
"McpUiToolResultNotification": {
38003828
"$schema": "https://json-schema.org/draft/2020-12/schema",
38013829
"type": "object",
@@ -4154,6 +4182,20 @@
41544182
},
41554183
"required": ["method", "params"],
41564184
"additionalProperties": false
4185+
},
4186+
"McpUiToolVisibility": {
4187+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4188+
"description": "Tool visibility scope - who can access the tool.",
4189+
"anyOf": [
4190+
{
4191+
"type": "string",
4192+
"const": "model"
4193+
},
4194+
{
4195+
"type": "string",
4196+
"const": "apps"
4197+
}
4198+
]
41574199
}
41584200
}
41594201
}

src/generated/schema.test.ts

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,12 @@ export type McpUiResourceMetaSchemaInferredType = z.infer<
9595
typeof generated.McpUiResourceMetaSchema
9696
>;
9797

98-
export type McpUiRequestDisplayModeRequestSchemaInferredType = z.infer<
99-
typeof generated.McpUiRequestDisplayModeRequestSchema
98+
export type McpUiToolVisibilitySchemaInferredType = z.infer<
99+
typeof generated.McpUiToolVisibilitySchema
100100
>;
101101

102-
export type McpUiRequestDisplayModeResultSchemaInferredType = z.infer<
103-
typeof generated.McpUiRequestDisplayModeResultSchema
102+
export type McpUiToolMetaSchemaInferredType = z.infer<
103+
typeof generated.McpUiToolMetaSchema
104104
>;
105105

106106
export type McpUiMessageRequestSchemaInferredType = z.infer<
@@ -225,18 +225,14 @@ expectType<spec.McpUiResourceCsp>({} as McpUiResourceCspSchemaInferredType);
225225
expectType<McpUiResourceCspSchemaInferredType>({} as spec.McpUiResourceCsp);
226226
expectType<spec.McpUiResourceMeta>({} as McpUiResourceMetaSchemaInferredType);
227227
expectType<McpUiResourceMetaSchemaInferredType>({} as spec.McpUiResourceMeta);
228-
expectType<spec.McpUiRequestDisplayModeRequest>(
229-
{} as McpUiRequestDisplayModeRequestSchemaInferredType,
228+
expectType<spec.McpUiToolVisibility>(
229+
{} as McpUiToolVisibilitySchemaInferredType,
230230
);
231-
expectType<McpUiRequestDisplayModeRequestSchemaInferredType>(
232-
{} as spec.McpUiRequestDisplayModeRequest,
233-
);
234-
expectType<spec.McpUiRequestDisplayModeResult>(
235-
{} as McpUiRequestDisplayModeResultSchemaInferredType,
236-
);
237-
expectType<McpUiRequestDisplayModeResultSchemaInferredType>(
238-
{} as spec.McpUiRequestDisplayModeResult,
231+
expectType<McpUiToolVisibilitySchemaInferredType>(
232+
{} as spec.McpUiToolVisibility,
239233
);
234+
expectType<spec.McpUiToolMeta>({} as McpUiToolMetaSchemaInferredType);
235+
expectType<McpUiToolMetaSchemaInferredType>({} as spec.McpUiToolMeta);
240236
expectType<spec.McpUiMessageRequest>(
241237
{} as McpUiMessageRequestSchemaInferredType,
242238
);

src/generated/schema.ts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -425,28 +425,32 @@ export const McpUiResourceMetaSchema = z.object({
425425
});
426426

427427
/**
428-
* @description Request to change the display mode of the UI.
429-
* The host will respond with the actual display mode that was set,
430-
* which may differ from the requested mode if not supported.
431-
* @see {@link app.App.requestDisplayMode} for the method that sends this request
428+
* @description Tool visibility scope - who can access the tool.
432429
*/
433-
export const McpUiRequestDisplayModeRequestSchema = z.object({
434-
method: z.literal("ui/request-display-mode"),
435-
params: z.object({
436-
/** @description The display mode being requested. */
437-
mode: McpUiDisplayModeSchema.describe("The display mode being requested."),
438-
}),
439-
});
430+
export const McpUiToolVisibilitySchema = z
431+
.union([z.literal("model"), z.literal("apps")])
432+
.describe("Tool visibility scope - who can access the tool.");
440433

441434
/**
442-
* @description Result from requesting a display mode change.
443-
* @see {@link McpUiRequestDisplayModeRequest}
435+
* @description UI-related metadata for tools.
444436
*/
445-
export const McpUiRequestDisplayModeResultSchema = z.looseObject({
446-
/** @description The display mode that was actually set. May differ from requested if not supported. */
447-
mode: McpUiDisplayModeSchema.describe(
448-
"The display mode that was actually set. May differ from requested if not supported.",
449-
),
437+
export const McpUiToolMetaSchema = z.object({
438+
/** @description URI of UI resource for rendering tool results. */
439+
resourceUri: z
440+
.string()
441+
.optional()
442+
.describe("URI of UI resource for rendering tool results."),
443+
/**
444+
* @description Who can access this tool. Default: ["model", "apps"]
445+
* - "model": Tool visible to and callable by the agent
446+
* - "apps": Tool callable by apps from this server only
447+
*/
448+
visibility: z
449+
.array(McpUiToolVisibilitySchema)
450+
.optional()
451+
.describe(
452+
'Who can access this tool. Default: ["model", "apps"]\n- "model": Tool visible to and callable by the agent\n- "apps": Tool callable by apps from this server only',
453+
),
450454
});
451455

452456
/**

0 commit comments

Comments
 (0)