Skip to content

Commit 7682c4c

Browse files
authored
Merge pull request #598 from sinedied/fix-empty-schema
fix: missing "properties" property in empty schema
2 parents 64a60c4 + 921ce70 commit 7682c4c

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/server/mcp.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ describe("tool()", () => {
267267
expect(result.tools[0].name).toBe("test");
268268
expect(result.tools[0].inputSchema).toEqual({
269269
type: "object",
270+
properties: {},
270271
});
271272

272273
// Adding the tool before the connection was established means no notification was sent

src/server/mcp.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,7 @@ export type RegisteredTool = {
11821182

11831183
const EMPTY_OBJECT_JSON_SCHEMA = {
11841184
type: "object" as const,
1185+
properties: {},
11851186
};
11861187

11871188
// Helper to check if an object is a Zod schema (ZodRawShape)

0 commit comments

Comments
 (0)