Function
formatValidationError
(toolName: string, error: zod.ZodError)
Source from the content-addressed store, hash-verified
| 230 | } |
| 231 | |
| 232 | function formatValidationError(toolName: string, error: zod.ZodError): string { |
| 233 | const details = error.issues |
| 234 | .map( |
| 235 | issue => |
| 236 | `${issue.path.length > 0 ? `${issue.path.join('.')}: ` : ''}${issue.message}`, |
| 237 | ) |
| 238 | .join(', '); |
| 239 | return `Input validation error: Invalid arguments for tool ${toolName}: ${details}`; |
| 240 | } |
| 241 | |
| 242 | function errorResult(text: string): CallToolResult { |
| 243 | return { |
Tested by
no test coverage detected