From 79bb249603c26a45ceafb59b6c0a20af2bc42b05 Mon Sep 17 00:00:00 2001 From: Dmytro Stanchiev Date: Tue, 28 Apr 2026 19:24:39 -0400 Subject: [PATCH] chore: replace `any` cast by asserting tool schema property types Tightens the type assertion for the `unstableFilter` schema property in tests to ensure correct structural checking of its `type` and `description` fields. --- packages/mcp-server/test/protocol.test.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/mcp-server/test/protocol.test.ts b/packages/mcp-server/test/protocol.test.ts index f760f1c..e6ba98c 100644 --- a/packages/mcp-server/test/protocol.test.ts +++ b/packages/mcp-server/test/protocol.test.ts @@ -72,7 +72,10 @@ describe("MCP protocol unstableFilter", () => { const tool = tools.find((t) => t.name === toolName); expect(tool).toBeDefined(); expect(tool?.inputSchema.properties).toHaveProperty("unstableFilter"); - const prop = tool?.inputSchema.properties.unstableFilter as any; + const prop = tool?.inputSchema.properties.unstableFilter as { + type: string; + description: string; + }; expect(prop.type).toBe("boolean"); expect(prop.description).toContain("optional"); expect(prop.description).toContain("20%");