Fix paginated requests requiring params

Resolves #21.
This commit is contained in:
Justin Spahr-Summers 2024-11-04 20:50:01 +00:00
commit f02952aa81
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -47,7 +47,7 @@ async function runClient(url_or_command: string, args: string[]) {
await client.connect(clientTransport);
console.log("Initialized.");
await client.request({ method: "resources/list", params: {} }, ListResourcesResultSchema);
await client.request({ method: "resources/list" }, ListResourcesResultSchema);
await client.close();
console.log("Closed.");

View file

@ -350,7 +350,7 @@ export const PaginatedRequestSchema = RequestSchema.extend({
* If provided, the server should return results starting after this cursor.
*/
cursor: z.optional(CursorSchema),
}),
}).optional(),
});
export const PaginatedResultSchema = ResultSchema.extend({