Skip to content

Commit 735d33d

Browse files
committed
Assert MCP tool metadata includes examples and annotations
1 parent 6da0de8 commit 735d33d

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

tests/mcp-handler.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,14 @@ describe("mcp request handler", () => {
3333
expect(
3434
toolsResponse.result?.tools.some((tool: { name: string }) => tool.name === "qirrel.tool_help"),
3535
).toBe(true);
36+
expect(
37+
toolsResponse.result?.tools.some(
38+
(tool: { name: string; examples?: unknown[]; annotations?: object }) =>
39+
tool.name === "qirrel.parse_text" &&
40+
Array.isArray(tool.examples) &&
41+
typeof tool.annotations === "object",
42+
),
43+
).toBe(true);
3644
});
3745

3846
test("supports tools/call and returns MCP tool payload", async () => {

0 commit comments

Comments
 (0)