@burdenoff/mcp-libs 2026.825.1 → 2026.825.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -324,9 +324,10 @@ var CANCEL_SYNC_RUN = `
|
|
|
324
324
|
}
|
|
325
325
|
`;
|
|
326
326
|
var LIST_COST_RECORDS = `
|
|
327
|
-
query AdaListCostRecords($connectionId: ID, $resourceId: ID, $service: String) {
|
|
328
|
-
adaListCostRecords(connectionId: $connectionId, resourceId: $resourceId, service: $service) {
|
|
329
|
-
${COST_RECORD_FIELDS}
|
|
327
|
+
query AdaListCostRecords($connectionId: ID, $resourceId: ID, $service: String, $pagination: PaginationInput) {
|
|
328
|
+
adaListCostRecords(connectionId: $connectionId, resourceId: $resourceId, service: $service, pagination: $pagination) {
|
|
329
|
+
items { ${COST_RECORD_FIELDS} }
|
|
330
|
+
pageInfo { hasMore }
|
|
330
331
|
}
|
|
331
332
|
}
|
|
332
333
|
`;
|
|
@@ -1393,7 +1394,7 @@ function registerCostTools(server, ctx, track) {
|
|
|
1393
1394
|
track(mcpToolName(ctx.productName, "cost_list")),
|
|
1394
1395
|
{
|
|
1395
1396
|
title: "List Cost Records",
|
|
1396
|
-
description: "List cost records, optionally filtered by connection, resource, and/or service.
|
|
1397
|
+
description: "List all cost records, optionally filtered by connection, resource, and/or service.",
|
|
1397
1398
|
inputSchema: {
|
|
1398
1399
|
connectionId: z.string().optional().describe("Filter by connection ID"),
|
|
1399
1400
|
resourceId: z.string().optional().describe("Filter by resource ID"),
|
|
@@ -1402,8 +1403,21 @@ function registerCostTools(server, ctx, track) {
|
|
|
1402
1403
|
},
|
|
1403
1404
|
async ({ connectionId, resourceId, service }) => {
|
|
1404
1405
|
try {
|
|
1405
|
-
const
|
|
1406
|
-
|
|
1406
|
+
const records = [];
|
|
1407
|
+
let offset = 0;
|
|
1408
|
+
for (; ; ) {
|
|
1409
|
+
const data = await ctx.gql.workspace.request(LIST_COST_RECORDS, {
|
|
1410
|
+
connectionId,
|
|
1411
|
+
resourceId,
|
|
1412
|
+
service,
|
|
1413
|
+
pagination: { limit: 100, offset }
|
|
1414
|
+
});
|
|
1415
|
+
const page = data.adaListCostRecords;
|
|
1416
|
+
records.push(...page.items);
|
|
1417
|
+
if (!page.pageInfo.hasMore || page.items.length === 0) break;
|
|
1418
|
+
offset += page.items.length;
|
|
1419
|
+
}
|
|
1420
|
+
return jsonResult(records);
|
|
1407
1421
|
} catch (error) {
|
|
1408
1422
|
ctx.logger.error("adaptercloud cost_list failed", { error: String(error) });
|
|
1409
1423
|
return errorResult(
|