Skip to main content

Function: findUnknownToolMentions()

findUnknownToolMentions(__namedParameters): string[]

Defined in: mcpSurface.ts:201

The tool names the instructions mention that the surface does not have.

Instructions are read once, at connect: a renamed tool they still name is one every connected agent is taught to call and then told is "not found". Pass pattern (a global RegExp whose first group is the name) when the instructions name tools some other way.

Parameters​

ParameterType
__namedParameters{ instructions: string; pattern?: RegExp; tools: Pick<McpSurfaceTool, "name">[]; }
__namedParameters.instructionsstring
__namedParameters.pattern?RegExp
__namedParameters.toolsPick<McpSurfaceTool, "name">[]

Returns​

string[]