{"record":{"id":"9ef7205090b45a52","repo":"paperclipai/paperclip","slug":"invalid-parameters","errorCode":"invalid_parameters","errorMessage":"run_tool requires a target tool name","messagePattern":"run_tool requires a target tool name","errorType":"http","errorClass":"ToolGatewayHttpError","httpStatus":400,"severity":"error","filePath":"server/src/services/tool-gateway.ts","lineNumber":2742,"sourceCode":"        throw new ToolGatewayHttpError(\n          409,\n          \"GitHub credentials are unavailable\",\n          \"github_identity_unavailable\",\n        );\n      }\n    }\n    return tool;\n  }\n\n  function virtualRunToolInput(parameters: unknown): {\n    targetToolName: string;\n    targetParameters: unknown;\n  } {\n    const params = asRecord(parameters) ?? {};\n    const targetToolName =\n      typeof params.tool === \"string\" ? params.tool.trim() : \"\";\n    if (!targetToolName) {\n      throw new ToolGatewayHttpError(\n        400,\n        \"run_tool requires a target tool name\",\n        \"invalid_parameters\",\n      );\n    }\n    return {\n      targetToolName,\n      targetParameters: params.arguments ?? {},\n    };\n  }\n\n  async function searchableOnDemandTools(\n    session: ToolGatewaySession,\n  ): Promise<ToolGatewayDescriptor[]> {\n    const tools = (await connectedMcpToolsForCompany(session.companyId)).filter(\n      isOnDemandRemoteTool,\n    );\n    const decisions = await Promise.all(","sourceCodeStart":2724,"sourceCodeEnd":2760,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/server/src/services/tool-gateway.ts#L2724-L2760","documentation":"Virtual run_tool dispatch guard: the agent invoked the run_tool meta-tool without the nested target tool name parameter (or with an empty value). The target name is mandatory because run_tool only forwards to another catalogued tool; supply the target tool's name and retry.","triggerScenarios":"Thrown at server/src/services/tool-gateway.ts:1887 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass the target tool name argument to run_tool; the call is missing its required tool identifier."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-09-18T08:03:59.046Z","contentChangedAt":"2026-09-18T08:03:59.046Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}