diff --git a/package.json b/package.json index db99e79..2cc72f0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@doitintl/doit-mcp-server", - "version": "0.1.31", + "version": "0.1.32", "description": "DoiT official MCP Server", "keywords": [ "doit", diff --git a/src/tools/__tests__/anomalies.test.ts b/src/tools/__tests__/anomalies.test.ts index 91818b4..90f8cf5 100644 --- a/src/tools/__tests__/anomalies.test.ts +++ b/src/tools/__tests__/anomalies.test.ts @@ -144,7 +144,7 @@ Top SKUs: const response = await handleAnomaliesRequest(mockArgs, mockToken); expect(makeDoitRequest).toHaveBeenCalledWith( - "https://api.doit.com/anomalies/v1?pageToken=next-page&maxResults=32", + "https://api.doit.com/anomalies/v1?pageToken=next-page&maxResults=20", mockToken, { method: "GET", @@ -172,7 +172,7 @@ Top SKUs: const response = await handleAnomaliesRequest(mockArgs, mockToken); expect(makeDoitRequest).toHaveBeenCalledWith( - "https://api.doit.com/anomalies/v1?maxResults=32", + "https://api.doit.com/anomalies/v1?maxResults=20", mockToken, { method: "GET", @@ -191,7 +191,7 @@ Top SKUs: const response = await handleAnomaliesRequest(mockArgs, mockToken); expect(makeDoitRequest).toHaveBeenCalledWith( - "https://api.doit.com/anomalies/v1?maxResults=32", + "https://api.doit.com/anomalies/v1?maxResults=20", mockToken, { method: "GET" } ); diff --git a/src/tools/anomalies.ts b/src/tools/anomalies.ts index bc47282..d9fe079 100644 --- a/src/tools/anomalies.ts +++ b/src/tools/anomalies.ts @@ -126,7 +126,7 @@ export async function handleAnomaliesRequest(args: any, token: string) { if (pageToken && pageToken.length > 1) { params.append("pageToken", pageToken); } - params.append("maxResults", "32"); + params.append("maxResults", "20"); let anomaliesUrl = `${DOIT_API_BASE}/anomalies/v1`; diff --git a/src/tools/invoices.ts b/src/tools/invoices.ts index 251818e..4af4a04 100644 --- a/src/tools/invoices.ts +++ b/src/tools/invoices.ts @@ -51,23 +51,6 @@ export const listInvoicesTool = { }, }, }, - outputSchema: z.object({ - invoices: z.array( - z.object({ - id: z.string(), - invoiceDate: z.number(), - platform: z.string(), - dueDate: z.number(), - status: z.string(), - totalAmount: z.number(), - balanceAmount: z.number(), - currency: z.string(), - url: z.string(), - }) - ), - pageToken: z.string().optional(), - rowCount: z.number(), - }), }; // Handler for the tool @@ -117,27 +100,6 @@ export const getInvoiceTool = { }, required: ["id"], }, - outputSchema: z.object({ - id: z.string(), - invoiceDate: z.number(), - platform: z.string(), - dueDate: z.number(), - status: z.string(), - totalAmount: z.number(), - balanceAmount: z.number(), - currency: z.string(), - url: z.string(), - lineItems: z.array( - z.object({ - currency: z.string(), - description: z.string(), - details: z.string(), - price: z.number(), - qty: z.number(), - type: z.string(), - }) - ), - }), }; // Handler for the tool diff --git a/src/tools/tickets.ts b/src/tools/tickets.ts index cb63e34..401f627 100644 --- a/src/tools/tickets.ts +++ b/src/tools/tickets.ts @@ -53,25 +53,6 @@ export const listTicketsTool = { }, }, }, - outputSchema: z.object({ - pageToken: z.string().optional(), - rowCount: z.number(), - tickets: z.array( - z.object({ - createTime: z.number(), - id: z.number(), - is_public: z.boolean(), - platform: z.string(), - product: z.string(), - requester: z.string(), - severity: z.string(), - status: z.string(), - subject: z.string(), - updateTime: z.number(), - urlUI: z.string(), - }) - ), - }), }; // Handler for the tool @@ -145,17 +126,6 @@ export const createTicketTool = { }, required: ["ticket"], }, - outputSchema: z.object({ - created: z.number(), - id: z.number(), - platform: z.string(), - product: z.string(), - requester: z.string(), - severity: z.string(), - status: z.string(), - subject: z.string(), - urlUI: z.string(), - }), }; // Handler for creating a ticket