chore(tool-gateway): remove code comments from invalid-params fallback

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cryppadottaandClaude Opus 5.5 committed 2026-11-19 15:30:21 +00:00
1 parent 13a1df8210
commit 7d23bc8366
2 files changed
-5

No files matched your search

@@ -3109,8 +3109,6 @@ describeEmbeddedPostgres("tool gateway service", () => {
const { company, agent, run } = await createRunFixture(db);
const { connection } = await createRemoteMcpToolFixture(db, company.id);
await db.insert(toolPolicies).values(readPolicyRow(company, "Allow read tools"));
// A provider that removed a tool answers -32602 with advice the screening
// model can classify as instructions, so the provider text is withheld.
const actual = injectionPreventionModule.promptInjectionPreventionService;
const screening = vi.spyOn(injectionPreventionModule, "promptInjectionPreventionService")
.mockImplementation((...args) => ({ ...actual(...args), classify: async () => ({
-3
View File
@@ -8723,9 +8723,6 @@ export function createToolGatewayService(
// deadline; it must not turn a received protocol error into a timeout.
clearTimeout(timer);
const errorRecord = asRecord(payloadRecord.error);
// -32602 also answers a call to a tool the server has since removed,
// so a stale catalog entry fails on every call. The provider's own text
// can be withheld by screening: say what the agent can check or report.
const fallback = errorRecord?.code === -32602
? "The app rejected the arguments for this tool. Check them against the tool's input schema. If they match, the app may have removed or changed this tool: ask a person who manages this connection to refresh its catalog"
: "Remote MCP server returned an error";