MCPcopy Create free account
hub / github.com/ChromeDevTools/chrome-devtools-mcp / formatValidationError

Function formatValidationError

src/ToolHandler.ts:207–215  ·  view source on GitHub ↗
(toolName: string, error: zod.ZodError)

Source from the content-addressed store, hash-verified

205}
206
207function 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
217function errorResult(text: string): CallToolResult {
218 return {

Callers 1

handleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected