mcp-zenskar 2.2.5 → 2.4.0
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.
- package/README.md +2 -1
- package/dist/mcp-config.json +48 -7
- package/dist/server.mjs +21 -19
- package/package.json +3 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Zenskar MCP Server
|
|
2
2
|
|
|
3
|
-
MCP server for the Zenskar API.
|
|
3
|
+
MCP server for the Zenskar API. 115 tools covering customers, contracts, invoices, payments, credit notes, accounting, products, plans, entitlements, billable metrics, and more.
|
|
4
4
|
|
|
5
5
|
## What it does
|
|
6
6
|
|
|
@@ -290,6 +290,7 @@ Once configured, you can ask Claude to interact with your Zenskar data:
|
|
|
290
290
|
| `getRawMetricLogs` | Get recent event rows for a Usage Event using the same preview-query path as the frontend |
|
|
291
291
|
| `getRawMetricBySlug` | Get a Usage Event by API slug; backend/API may also call it a raw metric |
|
|
292
292
|
| `ingestRawMetricEvent` | Ingest a usage event |
|
|
293
|
+
| `ingestRawMetricEventsBulk` | Ingest multiple usage events (up to 500) for a resource slug in a single call |
|
|
293
294
|
|
|
294
295
|
### Entitlements
|
|
295
296
|
|
package/dist/mcp-config.json
CHANGED
|
@@ -2903,6 +2903,46 @@
|
|
|
2903
2903
|
"prependBody": "## Usage Event Ingested\n\nThe usage event was ingested successfully:\n\n"
|
|
2904
2904
|
}
|
|
2905
2905
|
},
|
|
2906
|
+
{
|
|
2907
|
+
"name": "ingestRawMetricEventsBulk",
|
|
2908
|
+
"description": "Ingest MULTIPLE Usage Events for the specified resource slug in a single API call (bulk ingestion). Use this instead of calling ingestRawMetricEvent once per event — it sends one HTTP request carrying every event, which is far more efficient for CSV/batch imports. Each element of 'events' has the same shape as ingestRawMetricEvent's 'event' arg: customer_id, timestamp, and a data map with schema-compliant types. If importing from a CSV (or any source) whose column names don't clearly correspond to the expected fields (customer_id, timestamp, data.*), confirm the mapping with the user before constructing events — do not guess a mapping silently. Limit: 500 events per call — split larger batches into multiple calls. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling.",
|
|
2909
|
+
"needsApproval": true,
|
|
2910
|
+
"approvalConfig": {
|
|
2911
|
+
"title": "Ingest Usage Events (Bulk)",
|
|
2912
|
+
"description": "This will ingest ALL of the listed Usage Events for the selected Usage Event schema in one request. Review the full payload carefully — approving this ingests every event shown, not just one.",
|
|
2913
|
+
"warningText": "Ensure every event's data payload matches the Usage Event schema (raw metric schema) before proceeding. Up to 500 events are ingested in a single call; review the count and a sample of entries before confirming.",
|
|
2914
|
+
"confirmText": "Ingest Usage Events",
|
|
2915
|
+
"cancelText": "Cancel",
|
|
2916
|
+
"sensitiveFields": ["rawMetricSlug", "events"]
|
|
2917
|
+
},
|
|
2918
|
+
"args": [
|
|
2919
|
+
{
|
|
2920
|
+
"name": "rawMetricSlug",
|
|
2921
|
+
"description": "Slug of the Usage Event resource (raw metric), e.g. api_usage_events.",
|
|
2922
|
+
"type": "string",
|
|
2923
|
+
"required": true,
|
|
2924
|
+
"position": "path"
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
"name": "events",
|
|
2928
|
+
"description": "Array of Usage Event payloads, each containing customer_id, timestamp, and a data map with schema-compliant types — same shape as ingestRawMetricEvent's 'event' arg, but plural. customer_id and timestamp are mandatory on EVERY event; MCP does not auto-add them. Events are validated server-side against the raw metric's real schema before anything is sent — an unknown data field or wrong type is rejected with the exact list of valid fields, so you do NOT need to pre-fetch the schema via getRawMetricBySlug first; only do so if you're unsure what fields/types this raw metric expects. Maximum 500 events per call — if you have more, split into multiple calls to this tool. Prefer 100–200 events per call: batches approaching 500 consume significant context, more so under stateless approval (the batch is base64-packed into the approval token and echoed back verbatim). Example event shape: {\"customer_id\": \"example_customer\", \"timestamp\": \"2025-01-01 00:00:00\", \"data\": {\"String\": \"sample value\", \"Int64\": 10, \"Float64\": 42.5}}.",
|
|
2929
|
+
"type": "array",
|
|
2930
|
+
"required": true,
|
|
2931
|
+
"position": "body"
|
|
2932
|
+
}
|
|
2933
|
+
],
|
|
2934
|
+
"requestTemplate": {
|
|
2935
|
+
"url": "/usage/{rawMetricSlug}",
|
|
2936
|
+
"method": "POST",
|
|
2937
|
+
"headers": {
|
|
2938
|
+
"Content-Type": "application/json",
|
|
2939
|
+
"apiversion": "20240301"
|
|
2940
|
+
}
|
|
2941
|
+
},
|
|
2942
|
+
"responseTemplate": {
|
|
2943
|
+
"prependBody": "## Usage Events Ingested (Bulk)\n\nThe usage events were ingested successfully:\n\n"
|
|
2944
|
+
}
|
|
2945
|
+
},
|
|
2906
2946
|
{
|
|
2907
2947
|
"name": "extractContractFromRaw",
|
|
2908
2948
|
"description": "Extract structured contract data from raw text content using AI. This tool analyzes natural language contract descriptions and extracts key fields like dates, products, pricing, and billing terms. The extracted data can then be used to create a customer and contract via createCustomer and createContract tools.",
|
|
@@ -3751,21 +3791,21 @@
|
|
|
3751
3791
|
},
|
|
3752
3792
|
{
|
|
3753
3793
|
"name": "expireContract",
|
|
3754
|
-
"description": "THE ONLY tool that can expire, end, terminate or cancel
|
|
3794
|
+
"description": "THE ONLY tool that can expire, end, terminate or cancel contracts — use it whenever the user wants contracts to stop on a given date, including when they phrase it as 'update the expiry date'. Do NOT use updateContract for this. To expire SEVERAL contracts, pass every id in contractIds on a SINGLE call — never call this tool once per contract, as each call raises its own approval dialog and only the most recent one can be approved. Expire an ACTIVE or PAUSED contract by adjusting its end_date. Allowed status transitions: ACTIVE→EXPIRED, PAUSED→EXPIRED. EXPIRED is terminal — calling on an already-expired contract returns 400; do NOT retry, do NOT escalate to deleteContract or any other destructive tool as a fallback. Verify contract.status via getContractById before calling. Idempotency: NO. The contract expires at end of day 23:59:59.999999. Host enforces user confirmation via the approval gate; do NOT ask the user to re-confirm before calling.",
|
|
3755
3795
|
"needsApproval": true,
|
|
3756
3796
|
"approvalConfig": {
|
|
3757
3797
|
"title": "Expire Contract",
|
|
3758
3798
|
"description": "This will set the contract's end_date and transition status to EXPIRED. EXPIRED is terminal.",
|
|
3759
|
-
"warningText": "
|
|
3799
|
+
"warningText": "Approving this expires EVERY contract listed in contractIds — review the full list before confirming. Expiry is terminal: contracts cannot be re-activated through this endpoint, and future-dated phases beyond the expiry will be removed.",
|
|
3760
3800
|
"confirmText": "Expire Contract",
|
|
3761
3801
|
"cancelText": "Cancel",
|
|
3762
|
-
"sensitiveFields": ["
|
|
3802
|
+
"sensitiveFields": ["contractIds", "expiry_date"]
|
|
3763
3803
|
},
|
|
3764
3804
|
"args": [
|
|
3765
3805
|
{
|
|
3766
|
-
"name": "
|
|
3767
|
-
"description": "
|
|
3768
|
-
"type": "
|
|
3806
|
+
"name": "contractIds",
|
|
3807
|
+
"description": "UUIDs of the contracts to expire. Always a list, even for one contract. Pass every contract in one call. Each contract expires independently. The result reports each one.",
|
|
3808
|
+
"type": "array",
|
|
3769
3809
|
"required": true,
|
|
3770
3810
|
"position": "path"
|
|
3771
3811
|
},
|
|
@@ -3777,8 +3817,9 @@
|
|
|
3777
3817
|
"position": "body"
|
|
3778
3818
|
}
|
|
3779
3819
|
],
|
|
3820
|
+
"bulkOver": { "listArg": "contractIds", "maxBatch": 25 },
|
|
3780
3821
|
"requestTemplate": {
|
|
3781
|
-
"url": "/contract_v2/{
|
|
3822
|
+
"url": "/contract_v2/{contractIds}/expire",
|
|
3782
3823
|
"method": "PATCH",
|
|
3783
3824
|
"headers": {
|
|
3784
3825
|
"Content-Type": "application/json"
|