Skip to content

Commit 9084aa6

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 411787d commit 9084aa6

File tree

3 files changed

+87
-0
lines changed

3 files changed

+87
-0
lines changed

src/generated/schema.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3735,6 +3735,34 @@
37353735
"required": ["method", "params"],
37363736
"additionalProperties": false
37373737
},
3738+
"McpUiToolMeta": {
3739+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3740+
"type": "object",
3741+
"properties": {
3742+
"resourceUri": {
3743+
"description": "URI of UI resource for rendering tool results.",
3744+
"type": "string"
3745+
},
3746+
"visibility": {
3747+
"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",
3748+
"type": "array",
3749+
"items": {
3750+
"description": "Tool visibility scope - who can access the tool.",
3751+
"anyOf": [
3752+
{
3753+
"type": "string",
3754+
"const": "model"
3755+
},
3756+
{
3757+
"type": "string",
3758+
"const": "apps"
3759+
}
3760+
]
3761+
}
3762+
}
3763+
},
3764+
"additionalProperties": false
3765+
},
37383766
"McpUiToolResultNotification": {
37393767
"$schema": "https://json-schema.org/draft/2020-12/schema",
37403768
"type": "object",
@@ -4093,6 +4121,20 @@
40934121
},
40944122
"required": ["method", "params"],
40954123
"additionalProperties": false
4124+
},
4125+
"McpUiToolVisibility": {
4126+
"$schema": "https://json-schema.org/draft/2020-12/schema",
4127+
"description": "Tool visibility scope - who can access the tool.",
4128+
"anyOf": [
4129+
{
4130+
"type": "string",
4131+
"const": "model"
4132+
},
4133+
{
4134+
"type": "string",
4135+
"const": "apps"
4136+
}
4137+
]
40964138
}
40974139
}
40984140
}

src/generated/schema.test.ts

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

98+
export type McpUiToolVisibilitySchemaInferredType = z.infer<
99+
typeof generated.McpUiToolVisibilitySchema
100+
>;
101+
102+
export type McpUiToolMetaSchemaInferredType = z.infer<
103+
typeof generated.McpUiToolMetaSchema
104+
>;
105+
98106
export type McpUiMessageRequestSchemaInferredType = z.infer<
99107
typeof generated.McpUiMessageRequestSchema
100108
>;
@@ -217,6 +225,14 @@ expectType<spec.McpUiResourceCsp>({} as McpUiResourceCspSchemaInferredType);
217225
expectType<McpUiResourceCspSchemaInferredType>({} as spec.McpUiResourceCsp);
218226
expectType<spec.McpUiResourceMeta>({} as McpUiResourceMetaSchemaInferredType);
219227
expectType<McpUiResourceMetaSchemaInferredType>({} as spec.McpUiResourceMeta);
228+
expectType<spec.McpUiToolVisibility>(
229+
{} as McpUiToolVisibilitySchemaInferredType,
230+
);
231+
expectType<McpUiToolVisibilitySchemaInferredType>(
232+
{} as spec.McpUiToolVisibility,
233+
);
234+
expectType<spec.McpUiToolMeta>({} as McpUiToolMetaSchemaInferredType);
235+
expectType<McpUiToolMetaSchemaInferredType>({} as spec.McpUiToolMeta);
220236
expectType<spec.McpUiMessageRequest>(
221237
{} as McpUiMessageRequestSchemaInferredType,
222238
);

src/generated/schema.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,35 @@ export const McpUiResourceMetaSchema = z.object({
424424
),
425425
});
426426

427+
/**
428+
* @description Tool visibility scope - who can access the tool.
429+
*/
430+
export const McpUiToolVisibilitySchema = z
431+
.union([z.literal("model"), z.literal("apps")])
432+
.describe("Tool visibility scope - who can access the tool.");
433+
434+
/**
435+
* @description UI-related metadata for tools.
436+
*/
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+
),
454+
});
455+
427456
/**
428457
* @description Request to send a message to the host's chat interface.
429458
* @see {@link app.App.sendMessage} for the method that sends this request

0 commit comments

Comments
 (0)