Function
formatValidationError
(toolName: string, error: zod.ZodError)
Source from the content-addressed store, hash-verified
| 205 | } |
| 206 | |
| 207 | function formatValidationError(toolName: string, error: zod.ZodError): string { |
| 208 | const details = error.issues |
| 209 | .map( |
| 210 | issue => |
| 211 | `${issue.path.length > 0 ? `${issue.path.join('.')}: ` : ''}${issue.message}`, |
| 212 | ) |
| 213 | .join(', '); |
| 214 | return `Input validation error: Invalid arguments for tool ${toolName}: ${details}`; |
| 215 | } |
| 216 | |
| 217 | function errorResult(text: string): CallToolResult { |
| 218 | return { |
Tested by
no test coverage detected