Skip to content

Commit 0aebf7d

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 c9bc26b commit 0aebf7d

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
@@ -1810,6 +1810,34 @@
18101810
"required": ["method", "params"],
18111811
"additionalProperties": false
18121812
},
1813+
"McpUiToolMeta": {
1814+
"$schema": "https://json-schema.org/draft/2020-12/schema",
1815+
"type": "object",
1816+
"properties": {
1817+
"resourceUri": {
1818+
"description": "URI of UI resource for rendering tool results.",
1819+
"type": "string"
1820+
},
1821+
"visibility": {
1822+
"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",
1823+
"type": "array",
1824+
"items": {
1825+
"description": "Tool visibility scope - who can access the tool.",
1826+
"anyOf": [
1827+
{
1828+
"type": "string",
1829+
"const": "model"
1830+
},
1831+
{
1832+
"type": "string",
1833+
"const": "apps"
1834+
}
1835+
]
1836+
}
1837+
}
1838+
},
1839+
"additionalProperties": false
1840+
},
18131841
"McpUiToolResultNotification": {
18141842
"$schema": "https://json-schema.org/draft/2020-12/schema",
18151843
"type": "object",
@@ -2168,6 +2196,20 @@
21682196
},
21692197
"required": ["method", "params"],
21702198
"additionalProperties": false
2199+
},
2200+
"McpUiToolVisibility": {
2201+
"$schema": "https://json-schema.org/draft/2020-12/schema",
2202+
"description": "Tool visibility scope - who can access the tool.",
2203+
"anyOf": [
2204+
{
2205+
"type": "string",
2206+
"const": "model"
2207+
},
2208+
{
2209+
"type": "string",
2210+
"const": "apps"
2211+
}
2212+
]
21712213
}
21722214
}
21732215
}

src/generated/schema.test.ts

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

86+
export type McpUiToolVisibilitySchemaInferredType = z.infer<
87+
typeof generated.McpUiToolVisibilitySchema
88+
>;
89+
90+
export type McpUiToolMetaSchemaInferredType = z.infer<
91+
typeof generated.McpUiToolMetaSchema
92+
>;
93+
8694
export type McpUiMessageRequestSchemaInferredType = z.infer<
8795
typeof generated.McpUiMessageRequestSchema
8896
>;
@@ -195,6 +203,14 @@ expectType<spec.McpUiResourceCsp>({} as McpUiResourceCspSchemaInferredType);
195203
expectType<McpUiResourceCspSchemaInferredType>({} as spec.McpUiResourceCsp);
196204
expectType<spec.McpUiResourceMeta>({} as McpUiResourceMetaSchemaInferredType);
197205
expectType<McpUiResourceMetaSchemaInferredType>({} as spec.McpUiResourceMeta);
206+
expectType<spec.McpUiToolVisibility>(
207+
{} as McpUiToolVisibilitySchemaInferredType,
208+
);
209+
expectType<McpUiToolVisibilitySchemaInferredType>(
210+
{} as spec.McpUiToolVisibility,
211+
);
212+
expectType<spec.McpUiToolMeta>({} as McpUiToolMetaSchemaInferredType);
213+
expectType<McpUiToolMetaSchemaInferredType>({} as spec.McpUiToolMeta);
198214
expectType<spec.McpUiMessageRequest>(
199215
{} as McpUiMessageRequestSchemaInferredType,
200216
);

src/generated/schema.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,35 @@ export const McpUiResourceMetaSchema = z.object({
307307
),
308308
});
309309

310+
/**
311+
* @description Tool visibility scope - who can access the tool.
312+
*/
313+
export const McpUiToolVisibilitySchema = z
314+
.union([z.literal("model"), z.literal("apps")])
315+
.describe("Tool visibility scope - who can access the tool.");
316+
317+
/**
318+
* @description UI-related metadata for tools.
319+
*/
320+
export const McpUiToolMetaSchema = z.object({
321+
/** @description URI of UI resource for rendering tool results. */
322+
resourceUri: z
323+
.string()
324+
.optional()
325+
.describe("URI of UI resource for rendering tool results."),
326+
/**
327+
* @description Who can access this tool. Default: ["model", "apps"]
328+
* - "model": Tool visible to and callable by the agent
329+
* - "apps": Tool callable by apps from this server only
330+
*/
331+
visibility: z
332+
.array(McpUiToolVisibilitySchema)
333+
.optional()
334+
.describe(
335+
'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',
336+
),
337+
});
338+
310339
/**
311340
* @description Request to send a message to the host's chat interface.
312341
* @see {@link app.App.sendMessage} for the method that sends this request

0 commit comments

Comments
 (0)