Skip to content

Commit 18e3ecc

Browse files
committed
fix: update the mock responses
1 parent 3742c5d commit 18e3ecc

1 file changed

Lines changed: 15 additions & 1 deletion

File tree

src/scenarios/client/stateless.ts

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,8 +181,22 @@ export class StatelessScenario implements Scenario {
181181
}
182182

183183
// Return generic response to unblock client
184+
let result: any = {};
185+
if (request.method === 'tools/list') {
186+
result = {
187+
tools: [
188+
{
189+
name: 'long_running_task',
190+
description: 'A mock long running task for cancellation',
191+
inputSchema: { type: 'object', properties: {} }
192+
}
193+
]
194+
};
195+
} else if (request.method === 'tools/call') {
196+
result = { content: [] };
197+
}
184198
res.writeHead(200, { 'Content-Type': 'application/json' });
185-
res.end(JSON.stringify({ jsonrpc: '2.0', id: request.id, result: {} }));
199+
res.end(JSON.stringify({ jsonrpc: '2.0', id: request.id, result }));
186200
});
187201
}
188202
}

0 commit comments

Comments
 (0)