@meterbox/mcp 0.1.0 → 0.1.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.
- package/lib/tiers.js +5 -0
- package/lib/tools.js +10 -5
- package/package.json +2 -2
package/lib/tiers.js
CHANGED
|
@@ -30,6 +30,8 @@ const TIERS = {
|
|
|
30
30
|
"GET /v1/billing/invoices": "read",
|
|
31
31
|
"GET /v1/billing/invoices/{id}": "read",
|
|
32
32
|
"GET /v1/billing/payment-methods/{id}": "read",
|
|
33
|
+
"GET /v1/billing/rerates": "read",
|
|
34
|
+
"GET /v1/billing/rerates/{id}": "read",
|
|
33
35
|
"GET /v1/catalog/pricing-page": "read",
|
|
34
36
|
"GET /v1/catalog/pricing-page.js": "read",
|
|
35
37
|
"POST /v1/config-promotion/preview": "read",
|
|
@@ -111,6 +113,7 @@ const TIERS = {
|
|
|
111
113
|
"GET /v1/warehouse/manifest": "read",
|
|
112
114
|
// ── create: Purely additive: a new resource, no money movement, nothing overwritten.
|
|
113
115
|
"POST /v1/alerts/rules": "create",
|
|
116
|
+
"POST /v1/billing/rerates": "create",
|
|
114
117
|
"POST /v1/contracts/{id}/convert": "create",
|
|
115
118
|
"POST /v1/coupons": "create",
|
|
116
119
|
"POST /v1/customers/{id}/promo-entitlements": "create",
|
|
@@ -166,6 +169,7 @@ const TIERS = {
|
|
|
166
169
|
// ── destructive: Irreversible, money-moving (charges, refunds, credit notes, invoices, subscription changes), ledger/credit/wallet-affecting, or usage ingestion. Sandbox only.
|
|
167
170
|
"DELETE /v1/addons/{id}": "destructive",
|
|
168
171
|
"POST /v1/billing/close": "destructive",
|
|
172
|
+
"POST /v1/billing/rerates/{id}/apply": "destructive",
|
|
169
173
|
"POST /v1/billing/invoices/{id}/advance": "destructive",
|
|
170
174
|
"POST /v1/billing/invoices/{id}/approve": "destructive",
|
|
171
175
|
"POST /v1/billing/invoices/{id}/retry": "destructive",
|
|
@@ -245,6 +249,7 @@ const TIERS = {
|
|
|
245
249
|
"GET /v1/customer-portal/{id}/me": "excluded",
|
|
246
250
|
"GET /v1/customer-portal/{id}/optimization": "excluded",
|
|
247
251
|
"GET /v1/customer-portal/{id}/outcomes": "excluded",
|
|
252
|
+
"GET /v1/customer-portal/{id}/plans": "excluded",
|
|
248
253
|
"GET /v1/customer-portal/{id}/referral": "excluded",
|
|
249
254
|
"POST /v1/customer-portal/{id}/referral/redeem": "excluded",
|
|
250
255
|
"POST /v1/customer-portal/{id}/subscription/change": "excluded",
|
package/lib/tools.js
CHANGED
|
@@ -53,6 +53,11 @@ const EXECUTE_INPUT = {
|
|
|
53
53
|
required: ["operation"],
|
|
54
54
|
};
|
|
55
55
|
|
|
56
|
+
// Hosted Meterbox never runs a production write sent over MCP: it asks an
|
|
57
|
+
// owner or admin to approve it first.
|
|
58
|
+
const PRODUCTION_WRITES =
|
|
59
|
+
"In production it doesn't run: the result is a link for an owner or admin to approve the change.";
|
|
60
|
+
|
|
56
61
|
function toolDefinitions(apiReferenceUrl) {
|
|
57
62
|
const ref = apiReferenceUrl ? ` API reference: ${apiReferenceUrl}` : "";
|
|
58
63
|
const calls = `Calls the Meterbox REST API (/v1).${ref}`;
|
|
@@ -119,33 +124,33 @@ function toolDefinitions(apiReferenceUrl) {
|
|
|
119
124
|
readOnlyHint: true,
|
|
120
125
|
destructiveHint: false,
|
|
121
126
|
idempotentHint: true,
|
|
122
|
-
openWorldHint:
|
|
127
|
+
openWorldHint: false,
|
|
123
128
|
},
|
|
124
129
|
},
|
|
125
130
|
{
|
|
126
131
|
name: "meterbox_create",
|
|
127
132
|
tier: "create",
|
|
128
133
|
title: "Create in Meterbox",
|
|
129
|
-
description: `Run an operation that only adds a new record (e.g. a coupon, a quote, an alert rule) and never changes or removes existing ones or moves money. ${howTo} ${calls}`,
|
|
134
|
+
description: `Run an operation that only adds a new record (e.g. a coupon, a quote, an alert rule) and never changes or removes existing ones or moves money. ${PRODUCTION_WRITES} ${howTo} ${calls}`,
|
|
130
135
|
inputSchema: EXECUTE_INPUT,
|
|
131
136
|
annotations: {
|
|
132
137
|
readOnlyHint: false,
|
|
133
138
|
destructiveHint: false,
|
|
134
139
|
idempotentHint: false,
|
|
135
|
-
openWorldHint:
|
|
140
|
+
openWorldHint: false,
|
|
136
141
|
},
|
|
137
142
|
},
|
|
138
143
|
{
|
|
139
144
|
name: "meterbox_update",
|
|
140
145
|
tier: "update",
|
|
141
146
|
title: "Change records in Meterbox",
|
|
142
|
-
description: `Run an operation that changes or replaces existing records or settings (e.g. replace a plan, edit a customer's tags). Changes are reversible and never move money. ${howTo} ${calls}`,
|
|
147
|
+
description: `Run an operation that changes or replaces existing records or settings (e.g. replace a plan, edit a customer's tags). Changes are reversible and never move money. ${PRODUCTION_WRITES} ${howTo} ${calls}`,
|
|
143
148
|
inputSchema: EXECUTE_INPUT,
|
|
144
149
|
annotations: {
|
|
145
150
|
readOnlyHint: false,
|
|
146
151
|
destructiveHint: true,
|
|
147
152
|
idempotentHint: false,
|
|
148
|
-
openWorldHint:
|
|
153
|
+
openWorldHint: false,
|
|
149
154
|
},
|
|
150
155
|
},
|
|
151
156
|
{
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meterbox/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Meterbox MCP server: the hosted /mcp endpoint's tools and policy, plus a stdio bridge (npx @meterbox/mcp) for MCP clients that only speak stdio.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://meterbox.ai",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"bin": {
|
|
9
|
-
"meterbox-mcp": "
|
|
9
|
+
"meterbox-mcp": "bin/meterbox-mcp.js"
|
|
10
10
|
},
|
|
11
11
|
"files": [
|
|
12
12
|
"index.js",
|