MCPcopy Index your code
hub / github.com/ChromeDevTools/chrome-devtools-mcp / buildUnknownArgumentsMessage

Function buildUnknownArgumentsMessage

src/ToolHandler.ts:129–143  ·  view source on GitHub ↗
(
  toolName: string,
  unknownArgumentNames: string[],
  expectedArgumentNames: string[],
)

Source from the content-addressed store, hash-verified

127}
128
129function buildUnknownArgumentsMessage(
130 toolName: string,
131 unknownArgumentNames: string[],
132 expectedArgumentNames: string[],
133): string {
134 const unknownLabel =
135 unknownArgumentNames.length === 1 ? 'argument' : 'arguments';
136 const expectedArguments = expectedArgumentNames.length
137 ? `Expected arguments: ${formatArgumentNames(expectedArgumentNames)}.`
138 : 'This tool does not accept any arguments.';
139 const correction =
140 unknownArgumentNames.length === 1 ? 'Remove it' : 'Remove them';
141
142 return `Unknown ${unknownLabel} for tool "${toolName}": ${formatArgumentNames(unknownArgumentNames)}. ${expectedArguments} ${correction} and retry.`;
143}
144
145export class ToolHandler {
146 readonly inputSchema: zod.ZodRawShape;

Callers 1

handleMethod · 0.85

Calls 1

formatArgumentNamesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…