Skip to content

Commit 4b69caa

Browse files
test(integration): v1Surface uses registerTool raw-shape (C4/#1901) instead of closed .tool() variadic (C2/#1900)
1 parent 75e5122 commit 4b69caa

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/integration/test/compat/v1Surface.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ const _t: Transport | undefined = undefined;
4545
void _t;
4646

4747
describe('v1 API surface (bump-only compat)', () => {
48-
it('McpServer.tool() variadic + raw-shape + InMemory roundtrip + callTool(_, ResultSchema)', async () => {
48+
it('McpServer.registerTool with raw-shape inputSchema + InMemory roundtrip + callTool(_, ResultSchema)', async () => {
4949
const warn = vi.spyOn(console, 'warn').mockImplementation(() => {});
5050
const server = new McpServer({ name: 't', version: '1.0.0' });
51-
// C2 variadic + C4 raw-shape (object of ZodTypes, not z.object)
52-
server.tool('echo', { msg: z.string() }, async ({ msg }) => ({
51+
// C4: raw-shape inputSchema (object of ZodTypes, not z.object)
52+
server.registerTool('echo', { inputSchema: { msg: z.string() } }, async ({ msg }) => ({
5353
content: [{ type: 'text', text: msg }]
5454
}));
5555

0 commit comments

Comments
 (0)