@usethrottle/mcp 0.1.0 → 0.1.1

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/dist/mcp.js CHANGED
@@ -588,6 +588,41 @@ var ACTIONS = [
588
588
  'Each section needs its own scope (connectors:read, webhooks:read). Report a section as "not readable with this credential" instead of failing.'
589
589
  ]
590
590
  },
591
+ {
592
+ id: "get_business_summary",
593
+ title: "Business summary",
594
+ description: "How are we doing? Orders/revenue, subscription MRR, receivables and quotes pipeline for a week/month/quarter, always compared to the immediately preceding period of equal length.",
595
+ kind: "read",
596
+ scopes: [],
597
+ input: [
598
+ {
599
+ name: "period",
600
+ type: "string",
601
+ required: false,
602
+ description: "Reporting window.",
603
+ enum: ["week", "month", "quarter"],
604
+ default: "month"
605
+ }
606
+ ],
607
+ requests: [{ method: "GET", path: "/api/v1/analytics/business-summary" }],
608
+ channels: ["mcp", "zapier", "make", "n8n"],
609
+ guardrails: [
610
+ "Each section needs its own scope (orders:read, subscriptions:read, invoices:read, quotes:read). A section without its scope is reported as omitted rather than failing the whole call."
611
+ ]
612
+ },
613
+ {
614
+ id: "get_attention_digest",
615
+ title: "Attention digest",
616
+ description: "What needs attention right now? Open disputes, subscriptions in dunning, overdue Net-N invoices, and webhooks with degraded delivery health \u2014 a point-in-time snapshot, not a time range.",
617
+ kind: "read",
618
+ scopes: [],
619
+ input: [],
620
+ requests: [{ method: "GET", path: "/api/v1/analytics/attention-digest" }],
621
+ channels: ["mcp", "zapier", "make", "n8n"],
622
+ guardrails: [
623
+ "Each section needs its own scope (payment_disputes:read, subscriptions:read, invoices:read, webhook_deliveries:read). A section without its scope is reported as omitted rather than failing the whole call."
624
+ ]
625
+ },
591
626
  // ------------------------------------------------------------ sandbox write
592
627
  {
593
628
  id: "seed_test_data",
@@ -1188,6 +1223,8 @@ var HANDLERS = {
1188
1223
  note: "Seeded a finalized DRAFT order. No payment was captured \u2014 that needs a browser-tokenised payment method, which a server-side key cannot produce."
1189
1224
  };
1190
1225
  },
1226
+ get_business_summary: async (ctx, args) => ctx.client.get("/api/v1/analytics/business-summary", { period: args.period }),
1227
+ get_attention_digest: async (ctx) => ctx.client.get("/api/v1/analytics/attention-digest"),
1191
1228
  get_integration_status: async (ctx) => {
1192
1229
  const [connectors, endpoints, coverage] = await Promise.all([
1193
1230
  optional(() => ctx.client.list("/api/v1/connectors")),
@@ -1238,7 +1275,7 @@ function applyModifiers(field, type) {
1238
1275
  }
1239
1276
 
1240
1277
  // src/server.ts
1241
- var VERSION = true ? "0.1.0" : "0.0.0-dev";
1278
+ var VERSION = true ? "0.1.1" : "0.0.0-dev";
1242
1279
  function registerableActions(policy) {
1243
1280
  const isProduction = policy.identity.environment.providerEnvironment === "production";
1244
1281
  return actionsForChannel("mcp").filter((action) => {