Skip to content

Commit c4876f8

Browse files
committed
feat(api): enhance output schema for getPrompt tool
Added detailed output schema to the getPrompt tool, including fields for id, name, description, content, created_at, updated_at, workspace, and readonly status. This improves the clarity and usability of the API response.
1 parent d6d8962 commit c4876f8

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

  • packages/sdk/src/mcp/prompts

packages/sdk/src/mcp/prompts/api.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,26 @@ export const getPrompt = createTool({
249249
description: "Get a prompt by id",
250250
inputSchema: z.object({
251251
id: z.string(),
252+
}).describe("The id of the prompt to get"),
253+
outputSchema: z.object({
254+
id: z.string().describe("The id of the prompt"),
255+
name: z.string().describe("The name of the prompt"),
256+
description: z.string().nullable().describe(
257+
"The description of the prompt",
258+
),
259+
content: z.string().describe("The content of the prompt"),
260+
created_at: z.string().describe(
261+
"The date and time the prompt was created",
262+
),
263+
updated_at: z.string().nullable().optional().describe(
264+
"The date and time the prompt was last updated",
265+
),
266+
workspace: z.string().optional().describe(
267+
"The workspace the prompt belongs to",
268+
),
269+
readonly: z.boolean().optional().describe(
270+
"Whether the prompt is readonly",
271+
),
252272
}),
253273
handler: async (props, c) => {
254274
assertHasWorkspace(c);

0 commit comments

Comments
 (0)