Skip to content

Commit c21d699

Browse files
authored
Merge pull request #53 from doitintl/hotfix/talc/remove-output
fix(mcp): reduce anomalies count
2 parents 27908d4 + 0842591 commit c21d699

File tree

5 files changed

+5
-73
lines changed

5 files changed

+5
-73
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@doitintl/doit-mcp-server",
3-
"version": "0.1.31",
3+
"version": "0.1.32",
44
"description": "DoiT official MCP Server",
55
"keywords": [
66
"doit",

src/tools/__tests__/anomalies.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Top SKUs:
144144
const response = await handleAnomaliesRequest(mockArgs, mockToken);
145145

146146
expect(makeDoitRequest).toHaveBeenCalledWith(
147-
"https://api.doit.com/anomalies/v1?pageToken=next-page&maxResults=32",
147+
"https://api.doit.com/anomalies/v1?pageToken=next-page&maxResults=20",
148148
mockToken,
149149
{
150150
method: "GET",
@@ -172,7 +172,7 @@ Top SKUs:
172172
const response = await handleAnomaliesRequest(mockArgs, mockToken);
173173

174174
expect(makeDoitRequest).toHaveBeenCalledWith(
175-
"https://api.doit.com/anomalies/v1?maxResults=32",
175+
"https://api.doit.com/anomalies/v1?maxResults=20",
176176
mockToken,
177177
{
178178
method: "GET",
@@ -191,7 +191,7 @@ Top SKUs:
191191
const response = await handleAnomaliesRequest(mockArgs, mockToken);
192192

193193
expect(makeDoitRequest).toHaveBeenCalledWith(
194-
"https://api.doit.com/anomalies/v1?maxResults=32",
194+
"https://api.doit.com/anomalies/v1?maxResults=20",
195195
mockToken,
196196
{ method: "GET" }
197197
);

src/tools/anomalies.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ export async function handleAnomaliesRequest(args: any, token: string) {
126126
if (pageToken && pageToken.length > 1) {
127127
params.append("pageToken", pageToken);
128128
}
129-
params.append("maxResults", "32");
129+
params.append("maxResults", "20");
130130

131131
let anomaliesUrl = `${DOIT_API_BASE}/anomalies/v1`;
132132

src/tools/invoices.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,6 @@ export const listInvoicesTool = {
5151
},
5252
},
5353
},
54-
outputSchema: z.object({
55-
invoices: z.array(
56-
z.object({
57-
id: z.string(),
58-
invoiceDate: z.number(),
59-
platform: z.string(),
60-
dueDate: z.number(),
61-
status: z.string(),
62-
totalAmount: z.number(),
63-
balanceAmount: z.number(),
64-
currency: z.string(),
65-
url: z.string(),
66-
})
67-
),
68-
pageToken: z.string().optional(),
69-
rowCount: z.number(),
70-
}),
7154
};
7255

7356
// Handler for the tool
@@ -117,27 +100,6 @@ export const getInvoiceTool = {
117100
},
118101
required: ["id"],
119102
},
120-
outputSchema: z.object({
121-
id: z.string(),
122-
invoiceDate: z.number(),
123-
platform: z.string(),
124-
dueDate: z.number(),
125-
status: z.string(),
126-
totalAmount: z.number(),
127-
balanceAmount: z.number(),
128-
currency: z.string(),
129-
url: z.string(),
130-
lineItems: z.array(
131-
z.object({
132-
currency: z.string(),
133-
description: z.string(),
134-
details: z.string(),
135-
price: z.number(),
136-
qty: z.number(),
137-
type: z.string(),
138-
})
139-
),
140-
}),
141103
};
142104

143105
// Handler for the tool

src/tools/tickets.ts

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -53,25 +53,6 @@ export const listTicketsTool = {
5353
},
5454
},
5555
},
56-
outputSchema: z.object({
57-
pageToken: z.string().optional(),
58-
rowCount: z.number(),
59-
tickets: z.array(
60-
z.object({
61-
createTime: z.number(),
62-
id: z.number(),
63-
is_public: z.boolean(),
64-
platform: z.string(),
65-
product: z.string(),
66-
requester: z.string(),
67-
severity: z.string(),
68-
status: z.string(),
69-
subject: z.string(),
70-
updateTime: z.number(),
71-
urlUI: z.string(),
72-
})
73-
),
74-
}),
7556
};
7657

7758
// Handler for the tool
@@ -145,17 +126,6 @@ export const createTicketTool = {
145126
},
146127
required: ["ticket"],
147128
},
148-
outputSchema: z.object({
149-
created: z.number(),
150-
id: z.number(),
151-
platform: z.string(),
152-
product: z.string(),
153-
requester: z.string(),
154-
severity: z.string(),
155-
status: z.string(),
156-
subject: z.string(),
157-
urlUI: z.string(),
158-
}),
159129
};
160130

161131
// Handler for creating a ticket

0 commit comments

Comments
 (0)