Skip to content

Commit f02952a

Browse files
committed
Fix paginated requests requiring params
Resolves #21.
1 parent d474c57 commit f02952a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ async function runClient(url_or_command: string, args: string[]) {
4747
await client.connect(clientTransport);
4848
console.log("Initialized.");
4949

50-
await client.request({ method: "resources/list", params: {} }, ListResourcesResultSchema);
50+
await client.request({ method: "resources/list" }, ListResourcesResultSchema);
5151

5252
await client.close();
5353
console.log("Closed.");

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ export const PaginatedRequestSchema = RequestSchema.extend({
350350
* If provided, the server should return results starting after this cursor.
351351
*/
352352
cursor: z.optional(CursorSchema),
353-
}),
353+
}).optional(),
354354
});
355355

356356
export const PaginatedResultSchema = ResultSchema.extend({

0 commit comments

Comments
 (0)