/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { llmPromptsGet } from "../../funcs/llmPromptsGet.js"; import * as operations from "../../models/operations/index.js"; import { formatResult, ToolDefinition } from "../tools.js"; const args = { request: operations.GetPromptRequest$inboundSchema, }; export const tool$llmPromptsGet: ToolDefinition = { name: "llm-prompts-get", description: `Get a prompt Retrieves a prompt by its ID, including the active template. Pass \`version\` to get a specific version's template. Pass \`variables\` as a JSON-encoded map to render the template with substitutions.`, args, tool: async (client, args, ctx) => { const [result, apiCall] = await llmPromptsGet( client, args.request, { fetchOptions: { signal: ctx.signal } }, ).$inspect(); if (!result.ok) { return { content: [{ type: "text", text: result.error.message }], isError: true, }; } const value = result.value; return formatResult(value, apiCall); }, };