diff --git a/src/cli.ts b/src/cli.ts index f7bc15af..2713d779 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -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."); diff --git a/src/types.ts b/src/types.ts index 2cdbf9ba..aa2c6970 100644 --- a/src/types.ts +++ b/src/types.ts @@ -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({