(params: StructuredErrorParams)
| 11 | } |
| 12 | |
| 13 | export function createStructuredErrorOutput(params: StructuredErrorParams): StructuredToolOutput { |
| 14 | return { |
| 15 | schema: STRUCTURED_ERROR_SCHEMA, |
| 16 | schemaVersion: STRUCTURED_ERROR_SCHEMA_VERSION, |
| 17 | result: { |
| 18 | kind: 'error', |
| 19 | didError: true, |
| 20 | error: params.message, |
| 21 | category: params.category, |
| 22 | code: params.code, |
| 23 | }, |
| 24 | }; |
| 25 | } |
| 26 | |
| 27 | export function setStructuredErrorOutput( |
| 28 | ctx: Pick<ToolHandlerContext, 'structuredOutput'>, |
no outgoing calls
no test coverage detected