@yawlabs/lemonsqueezy-mcp 0.6.2 → 0.7.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.
Files changed (3) hide show
  1. package/README.md +7 -7
  2. package/dist/index.js +137 -88
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -173,11 +173,11 @@ All configuration is via environment variables. Only `LEMONSQUEEZY_API_KEY` (or
173
173
  | Variable | Purpose |
174
174
  | --- | --- |
175
175
  | `LEMONSQUEEZY_API_KEY` | LemonSqueezy API token. |
176
- | `LEMONSQUEEZY_API_KEY_COMMAND` | Command whose stdout produces the API key. Overrides `LEMONSQUEEZY_API_KEY`. Output is cached for 1 hour. Use this to pull short-lived credentials from a vault (`op read`, `gcloud secrets versions access`, etc.) without writing them to env vars. |
177
- | `LEMONSQUEEZY_ALLOWED_STORE_IDS` | Comma-separated allowlist of store IDs. When set: (1) any tool whose input includes a `storeId` rejects calls to a non-allowed store; (2) tools that *accept* a `storeId` filter (e.g. `ls_list_orders`, `ls_list_subscriptions`) require it — calls without one are blocked so a missing filter cannot return data from every store the API key can see. Tools with no `storeId` field at all (e.g. `ls_refund_order`, `ls_list_stores`) are not gated by this — pair with `LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS` and `LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT`. |
176
+ | `LEMONSQUEEZY_API_KEY_COMMAND` | Command whose stdout produces the API key. Overrides `LEMONSQUEEZY_API_KEY`. Output is cached for 1 hour. Use this to pull short-lived credentials from a vault (`op read`, `gcloud secrets versions access`, etc.) without writing them to env vars. The cache is keyed by the command string, so changing it mid-process refreshes on the next request; it is also invalidated automatically on a 401/403 from the API, so a key rotated upstream takes effect on the next call without waiting for the TTL. |
177
+ | `LEMONSQUEEZY_ALLOWED_STORE_IDS` | Comma-separated allowlist of store IDs. When set: (1) any tool whose input includes a `storeId` rejects calls to a non-allowed store; (2) tools that *accept* a `storeId` filter (e.g. `ls_list_orders`, `ls_list_subscriptions`) require it — calls without one are blocked so a missing filter cannot return data from every store the API key can see. Tools with no `storeId` field at all (e.g. `ls_refund_order`, `ls_cancel_subscription`, `ls_archive_customer`, `ls_delete_webhook`, `ls_delete_discount`, `ls_update_license_key`, `ls_list_stores`) route by their own resource ID and are **not** gated by this allowlist. For those, the only authoritative store boundary is the API key itself — pair this setting with a LemonSqueezy API key scoped to the same store(s), and pair with `LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS` / `LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT` for additional defense in depth. |
178
178
  | `LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS` | Rejects `ls_refund_order` and `ls_refund_subscription_invoice` calls above this amount. |
179
- | `LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT` | Max destructive tool calls per 60-second rolling window. In-process limit — per MCP server instance, not global; each `npx` cold start resets the window. Counts include `ls_update_license_key` calls that set `disabled: true`. |
180
- | `LEMONSQUEEZY_LOG=json` | Emit one JSON log line to stderr per tool and HTTP call. Destructive calls are tagged `audit: true` and include their inputs. |
179
+ | `LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT` | Max destructive tool calls per 60-second rolling window. In-process limit — per MCP server instance, not global; each `npx` cold start resets the window. Counts include `ls_update_license_key` calls that set `disabled: true`, and `ls_update_subscription` calls that pause or switch plan. |
180
+ | `LEMONSQUEEZY_LOG` | Structured-log verbosity to stderr. Set to `all` (or legacy `json`) to log every tool and HTTP call, `audit` to log only destructive-call audit entries plus errors (recommended for production), `error` to log only failures. Unset: no logs. Destructive calls are tagged `audit: true` and include their inputs. |
181
181
 
182
182
  ### Logging format
183
183
 
@@ -191,11 +191,11 @@ HTTP errors include the upstream `X-Request-Id` when present, so support tickets
191
191
 
192
192
  For unattended/agentic use against a live store, we recommend:
193
193
 
194
- 1. Set `LEMONSQUEEZY_ALLOWED_STORE_IDS` to the specific store(s) the agent may touch.
194
+ 1. Use a LemonSqueezy API key scoped to the specific store(s) the agent may touch — this is the only authoritative store boundary for tools that route by their own resource ID (refunds, cancels, archive, delete-webhook, etc.). Set `LEMONSQUEEZY_ALLOWED_STORE_IDS` to the same set as a defense-in-depth gate on the tools that *do* take a `storeId`.
195
195
  2. Set `LEMONSQUEEZY_MAX_REFUND_AMOUNT_CENTS` to a per-call cap well below any single-refund expectation.
196
196
  3. Set `LEMONSQUEEZY_DESTRUCTIVE_RATE_LIMIT` to a small number (e.g. 5/min) as a runaway-agent circuit breaker.
197
- 4. Set `LEMONSQUEEZY_LOG=json` and ship stderr to your log aggregator. Alert on `status: "guardrail_block"` or elevated error rates per tool.
198
- 5. Run `LEMONSQUEEZY_API_KEY_COMMAND` against a vault-backed secret so credentials can rotate without restarting the server process.
197
+ 4. Set `LEMONSQUEEZY_LOG=audit` and ship stderr to your log aggregator. The `audit` level keeps every destructive-call entry plus errors but drops successful reads so log volume stays bounded over weeks of operation. Alert on `status: "guardrail_block"` or elevated error rates per tool. Use `LEMONSQUEEZY_LOG=all` while debugging.
198
+ 5. Run `LEMONSQUEEZY_API_KEY_COMMAND` against a vault-backed secret so credentials can rotate without restarting the server process. The API client invalidates its in-process key cache automatically on a 401/403, so a rotated upstream key picks up on the next request rather than waiting on the 1h TTL.
199
199
 
200
200
  What the server does **not** do and you must own at the caller level:
201
201
 
package/dist/index.js CHANGED
@@ -30196,11 +30196,35 @@ function isDestructiveCall(tool, input) {
30196
30196
  }
30197
30197
 
30198
30198
  // src/logger.ts
30199
- function isEnabled() {
30200
- return process.env.LEMONSQUEEZY_LOG === "json";
30199
+ function getLogLevel() {
30200
+ const v = process.env.LEMONSQUEEZY_LOG;
30201
+ if (v === "json" || v === "all") return "all";
30202
+ if (v === "audit") return "audit";
30203
+ if (v === "error") return "error";
30204
+ return "off";
30205
+ }
30206
+ var ERROR_STATUS_TAGS = /* @__PURE__ */ new Set(["error", "exception", "guardrail_block", "timeout", "network_error"]);
30207
+ function isErrorEntry(entry) {
30208
+ if (entry.error !== void 0) return true;
30209
+ if (typeof entry.status === "string") return ERROR_STATUS_TAGS.has(entry.status);
30210
+ if (typeof entry.status === "number") return entry.status >= 400;
30211
+ return false;
30212
+ }
30213
+ function shouldLog(entry, level) {
30214
+ switch (level) {
30215
+ case "off":
30216
+ return false;
30217
+ case "all":
30218
+ return true;
30219
+ case "audit":
30220
+ return entry.audit === true || isErrorEntry(entry);
30221
+ case "error":
30222
+ return isErrorEntry(entry);
30223
+ }
30201
30224
  }
30202
30225
  function logEvent(entry) {
30203
- if (!isEnabled()) return;
30226
+ const level = getLogLevel();
30227
+ if (!shouldLog(entry, level)) return;
30204
30228
  try {
30205
30229
  const line = JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), ...entry });
30206
30230
  process.stderr.write(`${line}
@@ -30330,10 +30354,21 @@ function parseCommand(cmd) {
30330
30354
  if (parts.length === 0) throw new Error("LEMONSQUEEZY_API_KEY_COMMAND is empty");
30331
30355
  return { command: parts[0], args: parts.slice(1) };
30332
30356
  }
30357
+ function fromCache(fingerprint) {
30358
+ if (cached2 && cached2.fingerprint === fingerprint && cached2.expiresAt > Date.now()) {
30359
+ return cached2.key;
30360
+ }
30361
+ return null;
30362
+ }
30363
+ function intoCache(fingerprint, key) {
30364
+ cached2 = { fingerprint, key, expiresAt: Date.now() + CACHE_TTL_MS };
30365
+ }
30333
30366
  async function loadApiKey() {
30334
- if (cached2 && cached2.expiresAt > Date.now()) return cached2.key;
30335
30367
  const cmdStr = process.env.LEMONSQUEEZY_API_KEY_COMMAND;
30336
30368
  if (cmdStr && cmdStr.trim() !== "") {
30369
+ const fingerprint2 = `cmd:${cmdStr}`;
30370
+ const hit2 = fromCache(fingerprint2);
30371
+ if (hit2 !== null) return hit2;
30337
30372
  const { command, args } = parseCommand(cmdStr);
30338
30373
  let stdout;
30339
30374
  try {
@@ -30346,23 +30381,31 @@ async function loadApiKey() {
30346
30381
  const msg = err instanceof Error ? err.message : String(err);
30347
30382
  throw new Error(`LEMONSQUEEZY_API_KEY_COMMAND failed: ${msg}`);
30348
30383
  }
30349
- const key2 = stdout.trim();
30350
- if (!key2) throw new Error("LEMONSQUEEZY_API_KEY_COMMAND produced empty output");
30351
- cached2 = { key: key2, expiresAt: Date.now() + CACHE_TTL_MS };
30352
- return key2;
30384
+ const key = stdout.trim();
30385
+ if (!key) throw new Error("LEMONSQUEEZY_API_KEY_COMMAND produced empty output");
30386
+ intoCache(fingerprint2, key);
30387
+ return key;
30353
30388
  }
30354
- const key = process.env.LEMONSQUEEZY_API_KEY;
30355
- if (!key) {
30389
+ const raw = process.env.LEMONSQUEEZY_API_KEY;
30390
+ if (!raw) {
30356
30391
  throw new Error("LEMONSQUEEZY_API_KEY or LEMONSQUEEZY_API_KEY_COMMAND environment variable is required.");
30357
30392
  }
30358
- if (key.trim() === "") {
30393
+ if (raw.trim() === "") {
30359
30394
  throw new Error("LEMONSQUEEZY_API_KEY is set but empty. Provide a valid API key.");
30360
30395
  }
30361
- return key;
30396
+ const fingerprint = `env:${raw}`;
30397
+ const hit = fromCache(fingerprint);
30398
+ if (hit !== null) return hit;
30399
+ intoCache(fingerprint, raw);
30400
+ return raw;
30401
+ }
30402
+ function invalidateApiKeyCache() {
30403
+ cached2 = null;
30362
30404
  }
30363
30405
 
30364
30406
  // src/api.ts
30365
30407
  var BASE_URL = "https://api.lemonsqueezy.com/v1";
30408
+ var lsIdSchema = external_exports3.string().max(1e4).regex(/^[1-9]\d*$/, "ID must be a positive integer string (e.g. '12345')");
30366
30409
  function encodePath(segment) {
30367
30410
  return encodeURIComponent(String(segment));
30368
30411
  }
@@ -30421,6 +30464,9 @@ async function apiRequest(method, path, body) {
30421
30464
  const latency_ms = Date.now() - start;
30422
30465
  const requestId = res.headers.get("x-request-id") ?? void 0;
30423
30466
  if (!res.ok) {
30467
+ if (res.status === 401 || res.status === 403) {
30468
+ invalidateApiKeyCache();
30469
+ }
30424
30470
  const errorBody = await res.text();
30425
30471
  try {
30426
30472
  const parsed = JSON.parse(errorBody);
@@ -30610,7 +30656,7 @@ var affiliateTools = [
30610
30656
  openWorldHint: true
30611
30657
  },
30612
30658
  inputSchema: external_exports3.object({
30613
- affiliateId: external_exports3.string().max(1e4).describe("The affiliate ID"),
30659
+ affiliateId: lsIdSchema.describe("The affiliate ID"),
30614
30660
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,user')")
30615
30661
  }),
30616
30662
  handler: getHandler("/affiliates", "affiliateId")
@@ -30648,7 +30694,7 @@ var checkoutTools = [
30648
30694
  openWorldHint: true
30649
30695
  },
30650
30696
  inputSchema: external_exports3.object({
30651
- checkoutId: external_exports3.string().max(1e4).describe("The checkout ID"),
30697
+ checkoutId: lsIdSchema.describe("The checkout ID"),
30652
30698
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,variant')")
30653
30699
  }),
30654
30700
  handler: getHandler("/checkouts", "checkoutId")
@@ -30664,8 +30710,8 @@ var checkoutTools = [
30664
30710
  openWorldHint: true
30665
30711
  },
30666
30712
  inputSchema: external_exports3.object({
30667
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
30668
- variantId: external_exports3.string().max(1e4).optional().describe("Filter by variant ID"),
30713
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
30714
+ variantId: lsIdSchema.optional().describe("Filter by variant ID"),
30669
30715
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,variant')"),
30670
30716
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
30671
30717
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -30683,10 +30729,10 @@ var checkoutTools = [
30683
30729
  openWorldHint: true
30684
30730
  },
30685
30731
  inputSchema: external_exports3.object({
30686
- storeId: external_exports3.string().max(1e4).describe("The store ID"),
30687
- variantId: external_exports3.string().max(1e4).describe("The variant ID for the product being purchased"),
30732
+ storeId: lsIdSchema.describe("The store ID"),
30733
+ variantId: lsIdSchema.describe("The variant ID for the product being purchased"),
30688
30734
  customPrice: external_exports3.number().int().min(0).optional().describe("Custom price in cents (overrides the variant price)"),
30689
- enabledVariants: external_exports3.array(external_exports3.string()).optional().describe("Array of variant IDs to show on the checkout (for products with multiple variants)"),
30735
+ enabledVariants: external_exports3.array(lsIdSchema).optional().describe("Array of variant IDs to show on the checkout (for products with multiple variants)"),
30690
30736
  email: external_exports3.string().max(1e4).optional().describe("Prefill customer email"),
30691
30737
  name: external_exports3.string().max(1e4).optional().describe("Prefill customer name"),
30692
30738
  billingAddressCountry: external_exports3.string().max(1e4).optional().describe("Prefill billing country (ISO 3166-1 alpha-2)"),
@@ -30743,7 +30789,7 @@ var customerTools = [
30743
30789
  openWorldHint: true
30744
30790
  },
30745
30791
  inputSchema: external_exports3.object({
30746
- customerId: external_exports3.string().max(1e4).describe("The customer ID"),
30792
+ customerId: lsIdSchema.describe("The customer ID"),
30747
30793
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,orders,subscriptions,license-keys')")
30748
30794
  }),
30749
30795
  handler: getHandler("/customers", "customerId")
@@ -30759,7 +30805,7 @@ var customerTools = [
30759
30805
  openWorldHint: true
30760
30806
  },
30761
30807
  inputSchema: external_exports3.object({
30762
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
30808
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
30763
30809
  email: external_exports3.string().email().max(320).optional().describe("Filter by customer email"),
30764
30810
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,orders,subscriptions,license-keys')"),
30765
30811
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
@@ -30778,7 +30824,7 @@ var customerTools = [
30778
30824
  openWorldHint: true
30779
30825
  },
30780
30826
  inputSchema: external_exports3.object({
30781
- storeId: external_exports3.string().max(1e4).describe("The store ID to create the customer in"),
30827
+ storeId: lsIdSchema.describe("The store ID to create the customer in"),
30782
30828
  name: external_exports3.string().max(1e4).describe("Customer's full name"),
30783
30829
  email: external_exports3.string().email().max(320).describe("Customer's email address"),
30784
30830
  city: external_exports3.string().max(1e4).optional().describe("Customer's city"),
@@ -30806,7 +30852,7 @@ var customerTools = [
30806
30852
  },
30807
30853
  {
30808
30854
  name: "ls_update_customer",
30809
- description: "Update an existing customer's name, email, city, region, country, or status.",
30855
+ description: "Update an existing customer's name, email, city, region, country, or status. The only supported status value is 'archived' \u2014 use ls_archive_customer for the dedicated, audit-tagged path.",
30810
30856
  annotations: {
30811
30857
  title: "Update customer",
30812
30858
  readOnlyHint: false,
@@ -30818,16 +30864,19 @@ var customerTools = [
30818
30864
  // ls_archive_customer and must engage the same rate limiter / audit log;
30819
30865
  // otherwise the dedicated archive tool's destructive flag becomes a side
30820
30866
  // channel anyone can route around. Other field edits (name, email,
30821
- // address) stay on the regular path.
30867
+ // address) stay on the regular path. The schema constrains `status` to
30868
+ // the literal "archived" so a typo ("archive", "Archived") fails at
30869
+ // validation rather than slipping past the predicate as a non-destructive
30870
+ // PATCH that the API would 422 anyway.
30822
30871
  isDestructive: (input) => input.status === "archived",
30823
30872
  inputSchema: external_exports3.object({
30824
- customerId: external_exports3.string().max(1e4).describe("The customer ID to update"),
30873
+ customerId: lsIdSchema.describe("The customer ID to update"),
30825
30874
  name: external_exports3.string().max(1e4).optional().describe("New name"),
30826
30875
  email: external_exports3.string().email().max(320).optional().describe("New email"),
30827
30876
  city: external_exports3.string().max(1e4).optional().describe("New city"),
30828
30877
  region: external_exports3.string().max(1e4).optional().describe("New region/state"),
30829
30878
  country: external_exports3.string().max(1e4).optional().describe("New country (ISO 3166-1 alpha-2 code)"),
30830
- status: external_exports3.string().max(1e4).optional().describe("New status ('archived' to archive the customer)")
30879
+ status: external_exports3.literal("archived").optional().describe("Set to 'archived' to archive the customer. Equivalent to calling ls_archive_customer.")
30831
30880
  }),
30832
30881
  handler: async (input) => {
30833
30882
  const attributes = {};
@@ -30857,7 +30906,7 @@ var customerTools = [
30857
30906
  openWorldHint: true
30858
30907
  },
30859
30908
  inputSchema: external_exports3.object({
30860
- customerId: external_exports3.string().max(1e4).describe("The customer ID to archive")
30909
+ customerId: lsIdSchema.describe("The customer ID to archive")
30861
30910
  }),
30862
30911
  handler: async (input) => {
30863
30912
  return apiPatch(`/customers/${encodePath(input.customerId)}`, {
@@ -30884,7 +30933,7 @@ var discountRedemptionTools = [
30884
30933
  openWorldHint: true
30885
30934
  },
30886
30935
  inputSchema: external_exports3.object({
30887
- discountRedemptionId: external_exports3.string().max(1e4).describe("The discount redemption ID"),
30936
+ discountRedemptionId: lsIdSchema.describe("The discount redemption ID"),
30888
30937
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'discount,order')")
30889
30938
  }),
30890
30939
  handler: getHandler("/discount-redemptions", "discountRedemptionId")
@@ -30900,8 +30949,8 @@ var discountRedemptionTools = [
30900
30949
  openWorldHint: true
30901
30950
  },
30902
30951
  inputSchema: external_exports3.object({
30903
- discountId: external_exports3.string().max(1e4).optional().describe("Filter by discount ID"),
30904
- orderId: external_exports3.string().max(1e4).optional().describe("Filter by order ID"),
30952
+ discountId: lsIdSchema.optional().describe("Filter by discount ID"),
30953
+ orderId: lsIdSchema.optional().describe("Filter by order ID"),
30905
30954
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'discount,order')"),
30906
30955
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
30907
30956
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -30923,7 +30972,7 @@ var discountTools = [
30923
30972
  openWorldHint: true
30924
30973
  },
30925
30974
  inputSchema: external_exports3.object({
30926
- discountId: external_exports3.string().max(1e4).describe("The discount ID"),
30975
+ discountId: lsIdSchema.describe("The discount ID"),
30927
30976
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,variants,discount-redemptions')")
30928
30977
  }),
30929
30978
  handler: getHandler("/discounts", "discountId")
@@ -30939,7 +30988,7 @@ var discountTools = [
30939
30988
  openWorldHint: true
30940
30989
  },
30941
30990
  inputSchema: external_exports3.object({
30942
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
30991
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
30943
30992
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,variants,discount-redemptions')"),
30944
30993
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
30945
30994
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -30957,7 +31006,7 @@ var discountTools = [
30957
31006
  openWorldHint: true
30958
31007
  },
30959
31008
  inputSchema: external_exports3.object({
30960
- storeId: external_exports3.string().max(1e4).describe("The store ID to create the discount in"),
31009
+ storeId: lsIdSchema.describe("The store ID to create the discount in"),
30961
31010
  name: external_exports3.string().max(1e4).describe("Internal name for the discount"),
30962
31011
  code: external_exports3.string().max(1e4).describe("The discount code customers will enter (e.g. 'SAVE20')"),
30963
31012
  amount: external_exports3.number().int().min(1).describe(
@@ -30972,7 +31021,7 @@ var discountTools = [
30972
31021
  startsAt: external_exports3.string().max(1e4).optional().describe("When the discount becomes active (ISO 8601 format)"),
30973
31022
  expiresAt: external_exports3.string().max(1e4).optional().describe("When the discount expires (ISO 8601 format)"),
30974
31023
  isLimitedToProducts: external_exports3.boolean().optional().describe("If true, the discount only applies to specific variants (set via variantIds)"),
30975
- variantIds: external_exports3.array(external_exports3.string()).optional().describe("Array of variant IDs this discount applies to (requires isLimitedToProducts: true)")
31024
+ variantIds: external_exports3.array(lsIdSchema).optional().describe("Array of variant IDs this discount applies to (requires isLimitedToProducts: true)")
30976
31025
  }),
30977
31026
  handler: async (input) => {
30978
31027
  const attributes = {
@@ -31015,7 +31064,7 @@ var discountTools = [
31015
31064
  openWorldHint: true
31016
31065
  },
31017
31066
  inputSchema: external_exports3.object({
31018
- discountId: external_exports3.string().max(1e4).describe("The discount ID to delete")
31067
+ discountId: lsIdSchema.describe("The discount ID to delete")
31019
31068
  }),
31020
31069
  handler: async (input) => {
31021
31070
  return apiDelete(`/discounts/${encodePath(input.discountId)}`);
@@ -31036,7 +31085,7 @@ var fileTools = [
31036
31085
  openWorldHint: true
31037
31086
  },
31038
31087
  inputSchema: external_exports3.object({
31039
- fileId: external_exports3.string().max(1e4).describe("The file ID"),
31088
+ fileId: lsIdSchema.describe("The file ID"),
31040
31089
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'variant')")
31041
31090
  }),
31042
31091
  handler: getHandler("/files", "fileId")
@@ -31052,7 +31101,7 @@ var fileTools = [
31052
31101
  openWorldHint: true
31053
31102
  },
31054
31103
  inputSchema: external_exports3.object({
31055
- variantId: external_exports3.string().max(1e4).optional().describe("Filter by variant ID"),
31104
+ variantId: lsIdSchema.optional().describe("Filter by variant ID"),
31056
31105
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'variant')"),
31057
31106
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31058
31107
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31074,7 +31123,7 @@ var licenseKeyInstanceTools = [
31074
31123
  openWorldHint: true
31075
31124
  },
31076
31125
  inputSchema: external_exports3.object({
31077
- licenseKeyInstanceId: external_exports3.string().max(1e4).describe("The license key instance ID"),
31126
+ licenseKeyInstanceId: lsIdSchema.describe("The license key instance ID"),
31078
31127
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'license-key')")
31079
31128
  }),
31080
31129
  handler: getHandler("/license-key-instances", "licenseKeyInstanceId")
@@ -31090,7 +31139,7 @@ var licenseKeyInstanceTools = [
31090
31139
  openWorldHint: true
31091
31140
  },
31092
31141
  inputSchema: external_exports3.object({
31093
- licenseKeyId: external_exports3.string().max(1e4).optional().describe("Filter by license key ID"),
31142
+ licenseKeyId: lsIdSchema.optional().describe("Filter by license key ID"),
31094
31143
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'license-key')"),
31095
31144
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31096
31145
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31112,7 +31161,7 @@ var licenseKeyTools = [
31112
31161
  openWorldHint: true
31113
31162
  },
31114
31163
  inputSchema: external_exports3.object({
31115
- licenseKeyId: external_exports3.string().max(1e4).describe("The license key ID"),
31164
+ licenseKeyId: lsIdSchema.describe("The license key ID"),
31116
31165
  include: external_exports3.string().max(1e4).optional().describe(
31117
31166
  "Comma-separated related resources to include (e.g. 'store,customer,order,order-item,product,license-key-instances')"
31118
31167
  )
@@ -31130,10 +31179,10 @@ var licenseKeyTools = [
31130
31179
  openWorldHint: true
31131
31180
  },
31132
31181
  inputSchema: external_exports3.object({
31133
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
31134
- orderId: external_exports3.string().max(1e4).optional().describe("Filter by order ID"),
31135
- orderItemId: external_exports3.string().max(1e4).optional().describe("Filter by order item ID"),
31136
- productId: external_exports3.string().max(1e4).optional().describe("Filter by product ID"),
31182
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
31183
+ orderId: lsIdSchema.optional().describe("Filter by order ID"),
31184
+ orderItemId: lsIdSchema.optional().describe("Filter by order item ID"),
31185
+ productId: lsIdSchema.optional().describe("Filter by product ID"),
31137
31186
  include: external_exports3.string().max(1e4).optional().describe(
31138
31187
  "Comma-separated related resources to include (e.g. 'store,customer,order,order-item,product,license-key-instances')"
31139
31188
  ),
@@ -31163,7 +31212,7 @@ var licenseKeyTools = [
31163
31212
  // on the regular path.
31164
31213
  isDestructive: (input) => input.disabled === true,
31165
31214
  inputSchema: external_exports3.object({
31166
- licenseKeyId: external_exports3.string().max(1e4).describe("The license key ID to update"),
31215
+ licenseKeyId: lsIdSchema.describe("The license key ID to update"),
31167
31216
  activationLimit: external_exports3.number().int().min(0).optional().describe("Maximum number of activations allowed (0 = unlimited)"),
31168
31217
  disabled: external_exports3.boolean().optional().describe("Set to true to disable this license key"),
31169
31218
  expiresAt: external_exports3.string().max(1e4).nullable().optional().describe("Expiry date (ISO 8601 format). Set to null to remove expiry.")
@@ -31263,7 +31312,7 @@ var orderItemTools = [
31263
31312
  openWorldHint: true
31264
31313
  },
31265
31314
  inputSchema: external_exports3.object({
31266
- orderItemId: external_exports3.string().max(1e4).describe("The order item ID"),
31315
+ orderItemId: lsIdSchema.describe("The order item ID"),
31267
31316
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'order,product,variant')")
31268
31317
  }),
31269
31318
  handler: getHandler("/order-items", "orderItemId")
@@ -31279,9 +31328,9 @@ var orderItemTools = [
31279
31328
  openWorldHint: true
31280
31329
  },
31281
31330
  inputSchema: external_exports3.object({
31282
- orderId: external_exports3.string().max(1e4).optional().describe("Filter by order ID"),
31283
- productId: external_exports3.string().max(1e4).optional().describe("Filter by product ID"),
31284
- variantId: external_exports3.string().max(1e4).optional().describe("Filter by variant ID"),
31331
+ orderId: lsIdSchema.optional().describe("Filter by order ID"),
31332
+ productId: lsIdSchema.optional().describe("Filter by product ID"),
31333
+ variantId: lsIdSchema.optional().describe("Filter by variant ID"),
31285
31334
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'order,product,variant')"),
31286
31335
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31287
31336
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31303,7 +31352,7 @@ var orderTools = [
31303
31352
  openWorldHint: true
31304
31353
  },
31305
31354
  inputSchema: external_exports3.object({
31306
- orderId: external_exports3.string().max(1e4).describe("The order ID"),
31355
+ orderId: lsIdSchema.describe("The order ID"),
31307
31356
  include: external_exports3.string().max(1e4).optional().describe(
31308
31357
  "Comma-separated related resources to include (e.g. 'store,customer,order-items,subscriptions,license-keys,discount-redemptions')"
31309
31358
  )
@@ -31321,7 +31370,7 @@ var orderTools = [
31321
31370
  openWorldHint: true
31322
31371
  },
31323
31372
  inputSchema: external_exports3.object({
31324
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
31373
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
31325
31374
  userEmail: external_exports3.string().email().max(320).optional().describe("Filter by user email"),
31326
31375
  include: external_exports3.string().max(1e4).optional().describe(
31327
31376
  "Comma-separated related resources to include (e.g. 'store,customer,order-items,subscriptions,license-keys,discount-redemptions')"
@@ -31342,7 +31391,7 @@ var orderTools = [
31342
31391
  openWorldHint: true
31343
31392
  },
31344
31393
  inputSchema: external_exports3.object({
31345
- orderId: external_exports3.string().max(1e4).describe("The order ID"),
31394
+ orderId: lsIdSchema.describe("The order ID"),
31346
31395
  name: external_exports3.string().max(1e4).optional().describe("Customer name on the invoice"),
31347
31396
  address: external_exports3.string().max(1e4).optional().describe("Customer address on the invoice"),
31348
31397
  city: external_exports3.string().max(1e4).optional().describe("Customer city"),
@@ -31377,7 +31426,7 @@ var orderTools = [
31377
31426
  openWorldHint: true
31378
31427
  },
31379
31428
  inputSchema: external_exports3.object({
31380
- orderId: external_exports3.string().max(1e4).describe("The order ID to refund"),
31429
+ orderId: lsIdSchema.describe("The order ID to refund"),
31381
31430
  amount: external_exports3.number().int().min(1).describe("Refund amount in cents (e.g. 1000 = $10.00)")
31382
31431
  }),
31383
31432
  handler: async (input) => {
@@ -31402,7 +31451,7 @@ var priceTools = [
31402
31451
  openWorldHint: true
31403
31452
  },
31404
31453
  inputSchema: external_exports3.object({
31405
- priceId: external_exports3.string().max(1e4).describe("The price ID"),
31454
+ priceId: lsIdSchema.describe("The price ID"),
31406
31455
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'variant')")
31407
31456
  }),
31408
31457
  handler: getHandler("/prices", "priceId")
@@ -31418,7 +31467,7 @@ var priceTools = [
31418
31467
  openWorldHint: true
31419
31468
  },
31420
31469
  inputSchema: external_exports3.object({
31421
- variantId: external_exports3.string().max(1e4).optional().describe("Filter by variant ID"),
31470
+ variantId: lsIdSchema.optional().describe("Filter by variant ID"),
31422
31471
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'variant')"),
31423
31472
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31424
31473
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31440,7 +31489,7 @@ var productTools = [
31440
31489
  openWorldHint: true
31441
31490
  },
31442
31491
  inputSchema: external_exports3.object({
31443
- productId: external_exports3.string().max(1e4).describe("The product ID"),
31492
+ productId: lsIdSchema.describe("The product ID"),
31444
31493
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,variants')")
31445
31494
  }),
31446
31495
  handler: getHandler("/products", "productId")
@@ -31456,7 +31505,7 @@ var productTools = [
31456
31505
  openWorldHint: true
31457
31506
  },
31458
31507
  inputSchema: external_exports3.object({
31459
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
31508
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
31460
31509
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,variants')"),
31461
31510
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31462
31511
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31478,7 +31527,7 @@ var storeTools = [
31478
31527
  openWorldHint: true
31479
31528
  },
31480
31529
  inputSchema: external_exports3.object({
31481
- storeId: external_exports3.string().max(1e4).describe("The store ID"),
31530
+ storeId: lsIdSchema.describe("The store ID"),
31482
31531
  include: external_exports3.string().max(1e4).optional().describe(
31483
31532
  "Comma-separated related resources to include (e.g. 'products,discounts,license-keys,subscriptions,webhooks')"
31484
31533
  )
@@ -31519,7 +31568,7 @@ var subscriptionInvoiceTools = [
31519
31568
  openWorldHint: true
31520
31569
  },
31521
31570
  inputSchema: external_exports3.object({
31522
- subscriptionInvoiceId: external_exports3.string().max(1e4).describe("The subscription invoice ID"),
31571
+ subscriptionInvoiceId: lsIdSchema.describe("The subscription invoice ID"),
31523
31572
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,subscription')")
31524
31573
  }),
31525
31574
  handler: getHandler("/subscription-invoices", "subscriptionInvoiceId")
@@ -31535,8 +31584,8 @@ var subscriptionInvoiceTools = [
31535
31584
  openWorldHint: true
31536
31585
  },
31537
31586
  inputSchema: external_exports3.object({
31538
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
31539
- subscriptionId: external_exports3.string().max(1e4).optional().describe("Filter by subscription ID"),
31587
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
31588
+ subscriptionId: lsIdSchema.optional().describe("Filter by subscription ID"),
31540
31589
  status: external_exports3.enum(["pending", "paid", "void", "refunded"]).optional().describe("Filter by invoice status"),
31541
31590
  refunded: external_exports3.boolean().optional().describe("Filter by refunded status"),
31542
31591
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store,subscription')"),
@@ -31561,7 +31610,7 @@ var subscriptionInvoiceTools = [
31561
31610
  openWorldHint: true
31562
31611
  },
31563
31612
  inputSchema: external_exports3.object({
31564
- subscriptionInvoiceId: external_exports3.string().max(1e4).describe("The subscription invoice ID"),
31613
+ subscriptionInvoiceId: lsIdSchema.describe("The subscription invoice ID"),
31565
31614
  name: external_exports3.string().max(1e4).optional().describe("Customer name on the invoice"),
31566
31615
  address: external_exports3.string().max(1e4).optional().describe("Customer address on the invoice"),
31567
31616
  city: external_exports3.string().max(1e4).optional().describe("Customer city"),
@@ -31598,7 +31647,7 @@ var subscriptionInvoiceTools = [
31598
31647
  openWorldHint: true
31599
31648
  },
31600
31649
  inputSchema: external_exports3.object({
31601
- subscriptionInvoiceId: external_exports3.string().max(1e4).describe("The subscription invoice ID to refund"),
31650
+ subscriptionInvoiceId: lsIdSchema.describe("The subscription invoice ID to refund"),
31602
31651
  amount: external_exports3.number().int().min(1).describe("Refund amount in cents (e.g. 1000 = $10.00)")
31603
31652
  }),
31604
31653
  handler: async (input) => {
@@ -31627,7 +31676,7 @@ var subscriptionItemTools = [
31627
31676
  openWorldHint: true
31628
31677
  },
31629
31678
  inputSchema: external_exports3.object({
31630
- subscriptionItemId: external_exports3.string().max(1e4).describe("The subscription item ID"),
31679
+ subscriptionItemId: lsIdSchema.describe("The subscription item ID"),
31631
31680
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'subscription,price,usage-records')")
31632
31681
  }),
31633
31682
  handler: getHandler("/subscription-items", "subscriptionItemId")
@@ -31643,8 +31692,8 @@ var subscriptionItemTools = [
31643
31692
  openWorldHint: true
31644
31693
  },
31645
31694
  inputSchema: external_exports3.object({
31646
- subscriptionId: external_exports3.string().max(1e4).optional().describe("Filter by subscription ID"),
31647
- priceId: external_exports3.string().max(1e4).optional().describe("Filter by price ID"),
31695
+ subscriptionId: lsIdSchema.optional().describe("Filter by subscription ID"),
31696
+ priceId: lsIdSchema.optional().describe("Filter by price ID"),
31648
31697
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'subscription,price,usage-records')"),
31649
31698
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31650
31699
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31662,7 +31711,7 @@ var subscriptionItemTools = [
31662
31711
  openWorldHint: true
31663
31712
  },
31664
31713
  inputSchema: external_exports3.object({
31665
- subscriptionItemId: external_exports3.string().max(1e4).describe("The subscription item ID to update"),
31714
+ subscriptionItemId: lsIdSchema.describe("The subscription item ID to update"),
31666
31715
  quantity: external_exports3.number().int().min(1).describe("New quantity for the subscription item")
31667
31716
  }),
31668
31717
  handler: async (input) => {
@@ -31686,7 +31735,7 @@ var subscriptionItemTools = [
31686
31735
  openWorldHint: true
31687
31736
  },
31688
31737
  inputSchema: external_exports3.object({
31689
- subscriptionItemId: external_exports3.string().max(1e4).describe("The subscription item ID")
31738
+ subscriptionItemId: lsIdSchema.describe("The subscription item ID")
31690
31739
  }),
31691
31740
  handler: async (input) => {
31692
31741
  return apiGet(`/subscription-items/${encodePath(input.subscriptionItemId)}/current-usage`);
@@ -31707,7 +31756,7 @@ var subscriptionTools = [
31707
31756
  openWorldHint: true
31708
31757
  },
31709
31758
  inputSchema: external_exports3.object({
31710
- subscriptionId: external_exports3.string().max(1e4).describe("The subscription ID"),
31759
+ subscriptionId: lsIdSchema.describe("The subscription ID"),
31711
31760
  include: external_exports3.string().max(1e4).optional().describe(
31712
31761
  "Comma-separated related resources to include (e.g. 'store,customer,order,order-item,product,variant,subscription-items,subscription-invoices')"
31713
31762
  )
@@ -31725,11 +31774,11 @@ var subscriptionTools = [
31725
31774
  openWorldHint: true
31726
31775
  },
31727
31776
  inputSchema: external_exports3.object({
31728
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
31729
- orderId: external_exports3.string().max(1e4).optional().describe("Filter by order ID"),
31730
- orderItemId: external_exports3.string().max(1e4).optional().describe("Filter by order item ID"),
31731
- productId: external_exports3.string().max(1e4).optional().describe("Filter by product ID"),
31732
- variantId: external_exports3.string().max(1e4).optional().describe("Filter by variant ID"),
31777
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
31778
+ orderId: lsIdSchema.optional().describe("Filter by order ID"),
31779
+ orderItemId: lsIdSchema.optional().describe("Filter by order item ID"),
31780
+ productId: lsIdSchema.optional().describe("Filter by product ID"),
31781
+ variantId: lsIdSchema.optional().describe("Filter by variant ID"),
31733
31782
  userEmail: external_exports3.string().email().max(320).optional().describe("Filter by user email"),
31734
31783
  status: external_exports3.enum(["on_trial", "active", "paused", "past_due", "unpaid", "cancelled", "expired"]).optional().describe("Filter by subscription status"),
31735
31784
  include: external_exports3.string().max(1e4).optional().describe(
@@ -31770,8 +31819,8 @@ var subscriptionTools = [
31770
31819
  // - disableProrations toggle on plan-change behavior
31771
31820
  isDestructive: (input) => typeof input.pause === "string" && input.pause !== "resume" || typeof input.variantId === "string",
31772
31821
  inputSchema: external_exports3.object({
31773
- subscriptionId: external_exports3.string().max(1e4).describe("The subscription ID to update"),
31774
- variantId: external_exports3.string().max(1e4).regex(/^[1-9]\d*$/, "variantId must be a positive integer string (e.g. '12345')").optional().describe("New variant ID for plan switching"),
31822
+ subscriptionId: lsIdSchema.describe("The subscription ID to update"),
31823
+ variantId: lsIdSchema.optional().describe("New variant ID for plan switching"),
31775
31824
  pause: external_exports3.enum(["void", "free", "resume"]).optional().describe("Pause mode: 'void' (pause, skip billing), 'free' (pause, keep access free), or 'resume' to unpause"),
31776
31825
  cancelled: external_exports3.literal(false).optional().describe(
31777
31826
  "Set to false to un-cancel a subscription before it expires. To cancel, use ls_cancel_subscription instead."
@@ -31810,7 +31859,7 @@ var subscriptionTools = [
31810
31859
  openWorldHint: true
31811
31860
  },
31812
31861
  inputSchema: external_exports3.object({
31813
- subscriptionId: external_exports3.string().max(1e4).describe("The subscription ID to cancel")
31862
+ subscriptionId: lsIdSchema.describe("The subscription ID to cancel")
31814
31863
  }),
31815
31864
  handler: async (input) => {
31816
31865
  return apiDelete(`/subscriptions/${encodePath(input.subscriptionId)}`);
@@ -31831,7 +31880,7 @@ var usageRecordTools = [
31831
31880
  openWorldHint: true
31832
31881
  },
31833
31882
  inputSchema: external_exports3.object({
31834
- usageRecordId: external_exports3.string().max(1e4).describe("The usage record ID"),
31883
+ usageRecordId: lsIdSchema.describe("The usage record ID"),
31835
31884
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'subscription-item')")
31836
31885
  }),
31837
31886
  handler: getHandler("/usage-records", "usageRecordId")
@@ -31847,7 +31896,7 @@ var usageRecordTools = [
31847
31896
  openWorldHint: true
31848
31897
  },
31849
31898
  inputSchema: external_exports3.object({
31850
- subscriptionItemId: external_exports3.string().max(1e4).optional().describe("Filter by subscription item ID"),
31899
+ subscriptionItemId: lsIdSchema.optional().describe("Filter by subscription item ID"),
31851
31900
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'subscription-item')"),
31852
31901
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31853
31902
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31868,7 +31917,7 @@ var usageRecordTools = [
31868
31917
  openWorldHint: true
31869
31918
  },
31870
31919
  inputSchema: external_exports3.object({
31871
- subscriptionItemId: external_exports3.string().max(1e4).describe("The subscription item ID to report usage for"),
31920
+ subscriptionItemId: lsIdSchema.describe("The subscription item ID to report usage for"),
31872
31921
  quantity: external_exports3.number().int().min(0).describe("The usage quantity to report"),
31873
31922
  action: external_exports3.enum(["increment", "set"]).optional().describe("How to apply the quantity: 'increment' (add to current, default) or 'set' (replace current)")
31874
31923
  }),
@@ -31924,7 +31973,7 @@ var variantTools = [
31924
31973
  openWorldHint: true
31925
31974
  },
31926
31975
  inputSchema: external_exports3.object({
31927
- variantId: external_exports3.string().max(1e4).describe("The variant ID"),
31976
+ variantId: lsIdSchema.describe("The variant ID"),
31928
31977
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'product,files')")
31929
31978
  }),
31930
31979
  handler: getHandler("/variants", "variantId")
@@ -31940,7 +31989,7 @@ var variantTools = [
31940
31989
  openWorldHint: true
31941
31990
  },
31942
31991
  inputSchema: external_exports3.object({
31943
- productId: external_exports3.string().max(1e4).optional().describe("Filter by product ID"),
31992
+ productId: lsIdSchema.optional().describe("Filter by product ID"),
31944
31993
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'product,files')"),
31945
31994
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31946
31995
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31962,7 +32011,7 @@ var webhookTools = [
31962
32011
  openWorldHint: true
31963
32012
  },
31964
32013
  inputSchema: external_exports3.object({
31965
- webhookId: external_exports3.string().max(1e4).describe("The webhook ID"),
32014
+ webhookId: lsIdSchema.describe("The webhook ID"),
31966
32015
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store')")
31967
32016
  }),
31968
32017
  handler: getHandler("/webhooks", "webhookId")
@@ -31978,7 +32027,7 @@ var webhookTools = [
31978
32027
  openWorldHint: true
31979
32028
  },
31980
32029
  inputSchema: external_exports3.object({
31981
- storeId: external_exports3.string().max(1e4).optional().describe("Filter by store ID"),
32030
+ storeId: lsIdSchema.optional().describe("Filter by store ID"),
31982
32031
  include: external_exports3.string().max(1e4).optional().describe("Comma-separated related resources to include (e.g. 'store')"),
31983
32032
  pageNumber: external_exports3.number().int().min(1).optional().describe("Page number (1-indexed)"),
31984
32033
  pageSize: external_exports3.number().int().min(1).max(100).optional().describe("Results per page (1-100)")
@@ -31996,7 +32045,7 @@ var webhookTools = [
31996
32045
  openWorldHint: true
31997
32046
  },
31998
32047
  inputSchema: external_exports3.object({
31999
- storeId: external_exports3.string().max(1e4).describe("The store ID"),
32048
+ storeId: lsIdSchema.describe("The store ID"),
32000
32049
  url: external_exports3.string().max(1e4).describe("The URL to send webhook events to"),
32001
32050
  events: external_exports3.array(external_exports3.string()).describe(
32002
32051
  "Event types to subscribe to (e.g. ['order_created', 'subscription_created', 'subscription_updated', 'subscription_cancelled', 'subscription_payment_success', 'subscription_payment_failed', 'license_key_created'])"
@@ -32030,7 +32079,7 @@ var webhookTools = [
32030
32079
  openWorldHint: true
32031
32080
  },
32032
32081
  inputSchema: external_exports3.object({
32033
- webhookId: external_exports3.string().max(1e4).describe("The webhook ID to update"),
32082
+ webhookId: lsIdSchema.describe("The webhook ID to update"),
32034
32083
  url: external_exports3.string().max(1e4).optional().describe("New URL to send webhook events to"),
32035
32084
  events: external_exports3.array(external_exports3.string()).optional().describe("Updated list of event types to subscribe to"),
32036
32085
  secret: external_exports3.string().min(6).max(40).optional().describe("New signing secret")
@@ -32060,7 +32109,7 @@ var webhookTools = [
32060
32109
  openWorldHint: true
32061
32110
  },
32062
32111
  inputSchema: external_exports3.object({
32063
- webhookId: external_exports3.string().max(1e4).describe("The webhook ID to delete")
32112
+ webhookId: lsIdSchema.describe("The webhook ID to delete")
32064
32113
  }),
32065
32114
  handler: async (input) => {
32066
32115
  return apiDelete(`/webhooks/${encodePath(input.webhookId)}`);
@@ -32069,7 +32118,7 @@ var webhookTools = [
32069
32118
  ];
32070
32119
 
32071
32120
  // src/index.ts
32072
- var version2 = true ? "0.6.2" : (await null).createRequire(import.meta.url)("../package.json").version;
32121
+ var version2 = true ? "0.7.0" : (await null).createRequire(import.meta.url)("../package.json").version;
32073
32122
  var subcommand = process.argv[2];
32074
32123
  if (subcommand === "version" || subcommand === "--version") {
32075
32124
  console.log(version2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yawlabs/lemonsqueezy-mcp",
3
- "version": "0.6.2",
3
+ "version": "0.7.0",
4
4
  "description": "LemonSqueezy MCP server for managing your store from AI assistants",
5
5
  "license": "MIT",
6
6
  "author": "YawLabs <contact@yaw.sh>",