diff --git a/src/index.ts b/src/index.ts index ef1b31a..1e1f17d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -28,7 +28,7 @@ function createEChartsServer(): McpServer { for (const tool of tools) { const { name, description, inputSchema, run } = tool; // biome-ignore lint/suspicious/noExplicitAny: - server.tool(name, description, inputSchema.shape, run as any); + server.tool(name, description, inputSchema.shape as any, run as any); } return server; diff --git a/src/utils/schema.ts b/src/utils/schema.ts index 3052829..9631489 100644 --- a/src/utils/schema.ts +++ b/src/utils/schema.ts @@ -49,9 +49,9 @@ export const WidthSchema = z .describe("Set the width of the chart, default is 800px."); // TODO: use zod v4 JSON to schema to replace zod-to-json-schema when v4 is stable -// biome-ignore lint/suspicious/noExplicitAny: -export const zodToJsonSchema = (schema: z.ZodType) => { - return zodToJsonSchemaOriginal(schema, { +export const zodToJsonSchema = (schema: unknown): Record => { + // biome-ignore lint/suspicious/noExplicitAny: Type assertion needed to avoid TypeScript deep type instantiation + return zodToJsonSchemaOriginal(schema as any, { rejectedAdditionalProperties: undefined, }); };