Skip to content

Commit e617922

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 605142a commit e617922

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
@@ -1788,6 +1788,34 @@
17881788
"required": ["method", "params"],
17891789
"additionalProperties": false
17901790
},
1791+
"McpUiToolMeta": {
1792+
"$schema": "https://json-schema.org/draft/2020-12/schema",
1793+
"type": "object",
1794+
"properties": {
1795+
"resourceUri": {
1796+
"description": "URI of UI resource for rendering tool results.",
1797+
"type": "string"
1798+
},
1799+
"visibility": {
1800+
"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",
1801+
"type": "array",
1802+
"items": {
1803+
"description": "Tool visibility scope - who can access the tool.",
1804+
"anyOf": [
1805+
{
1806+
"type": "string",
1807+
"const": "model"
1808+
},
1809+
{
1810+
"type": "string",
1811+
"const": "apps"
1812+
}
1813+
]
1814+
}
1815+
}
1816+
},
1817+
"additionalProperties": false
1818+
},
17911819
"McpUiToolResultNotification": {
17921820
"$schema": "https://json-schema.org/draft/2020-12/schema",
17931821
"type": "object",
@@ -2146,6 +2174,20 @@
21462174
},
21472175
"required": ["method", "params"],
21482176
"additionalProperties": false
2177+
},
2178+
"McpUiToolVisibility": {
2179+
"$schema": "https://json-schema.org/draft/2020-12/schema",
2180+
"description": "Tool visibility scope - who can access the tool.",
2181+
"anyOf": [
2182+
{
2183+
"type": "string",
2184+
"const": "model"
2185+
},
2186+
{
2187+
"type": "string",
2188+
"const": "apps"
2189+
}
2190+
]
21492191
}
21502192
}
21512193
}

src/generated/schema.test.ts

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

82+
export type McpUiToolVisibilitySchemaInferredType = z.infer<
83+
typeof generated.McpUiToolVisibilitySchema
84+
>;
85+
86+
export type McpUiToolMetaSchemaInferredType = z.infer<
87+
typeof generated.McpUiToolMetaSchema
88+
>;
89+
8290
export type McpUiMessageRequestSchemaInferredType = z.infer<
8391
typeof generated.McpUiMessageRequestSchema
8492
>;
@@ -185,6 +193,14 @@ expectType<spec.McpUiResourceCsp>({} as McpUiResourceCspSchemaInferredType);
185193
expectType<McpUiResourceCspSchemaInferredType>({} as spec.McpUiResourceCsp);
186194
expectType<spec.McpUiResourceMeta>({} as McpUiResourceMetaSchemaInferredType);
187195
expectType<McpUiResourceMetaSchemaInferredType>({} as spec.McpUiResourceMeta);
196+
expectType<spec.McpUiToolVisibility>(
197+
{} as McpUiToolVisibilitySchemaInferredType,
198+
);
199+
expectType<McpUiToolVisibilitySchemaInferredType>(
200+
{} as spec.McpUiToolVisibility,
201+
);
202+
expectType<spec.McpUiToolMeta>({} as McpUiToolMetaSchemaInferredType);
203+
expectType<McpUiToolMetaSchemaInferredType>({} as spec.McpUiToolMeta);
188204
expectType<spec.McpUiMessageRequest>(
189205
{} as McpUiMessageRequestSchemaInferredType,
190206
);

src/generated/schema.ts

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,35 @@ export const McpUiResourceMetaSchema = z.object({
289289
),
290290
});
291291

292+
/**
293+
* @description Tool visibility scope - who can access the tool.
294+
*/
295+
export const McpUiToolVisibilitySchema = z
296+
.union([z.literal("model"), z.literal("apps")])
297+
.describe("Tool visibility scope - who can access the tool.");
298+
299+
/**
300+
* @description UI-related metadata for tools.
301+
*/
302+
export const McpUiToolMetaSchema = z.object({
303+
/** @description URI of UI resource for rendering tool results. */
304+
resourceUri: z
305+
.string()
306+
.optional()
307+
.describe("URI of UI resource for rendering tool results."),
308+
/**
309+
* @description Who can access this tool. Default: ["model", "apps"]
310+
* - "model": Tool visible to and callable by the agent
311+
* - "apps": Tool callable by apps from this server only
312+
*/
313+
visibility: z
314+
.array(McpUiToolVisibilitySchema)
315+
.optional()
316+
.describe(
317+
'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',
318+
),
319+
});
320+
292321
/**
293322
* @description Request to send a message to the host's chat interface.
294323
* @see {@link app.App.sendMessage} for the method that sends this request

0 commit comments

Comments
 (0)