Skip to main content
Glama

Edit subscriptions

subscriptions_write
Destructive

Creates and updates tariff plans and subscriptions: grants access and trials, renews, changes plan, pauses and resumes, records and confirms payments. No action charges or refunds money by itself: grant, trial, renew, plan change and payment confirmation give paid access without payment, and auto-renewal lets the payment system charge the saved payment method of the subscriber, possibly within the hour when the period ends soon (also turned back on by renew, resume and payment confirmation when a payment method is saved, even if it was turned off).

Input Schema

NameRequiredDescriptionDefault
idNoLegacy tariff id.
typeNoPlan type: 0 free, 1 one-time, 2 recurring, 3 donate.
priceNo
titleNoPlan title (plan_add/update).
actionYesOperation to run. Each oneOf entry describes one action and lists its parameters.
amountNoPayment amount in minor currency units.
fieldsNoExtra request fields described in the subscriptions OpenAPI specification (docs_tool).
periodNoRecurring period in days.
confirmNoPass true only after the user approves this change. Required by: subscription_grant, payment_confirm.
plan_idNoTariff plan id.
user_idNoUser id.
currencyNoISO 4217 code, e.g. RUB.
group_toNoGroup id while subscription is active.
intervalNoSubscription interval in days.
price_oldNo
group_backNoGroup id after subscription ends.
payment_idNoPayment id.
descriptionNoPlan description.
is_discountNo
is_advantageNo
text_advantageNo
transaction_idNoIdempotent payment transaction id.
trial_intervalNo
advantage_itemsNoAdvantage lines separated by newline.
subscription_idNoSubscription id.
payment_method_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / action / oneOf
      Previous value: -[
      -  {
      -    "const": "plan_add",
      -    "description": "Creates a tariff plan. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "plan_update",
      -    "description": "Updates a tariff plan. Required: plan_id. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "plan_enable",
      -    "description": "Enables a tariff plan. Required: plan_id."
      -  },
      -  {
      -    "const": "plan_disable",
      -    "description": "Disables a tariff plan. Required: plan_id."
      -  },
      -  {
      -    "const": "legacy_item_add",
      -    "description": "Creates a legacy tariff. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "legacy_item_update",
      -    "description": "Updates a legacy tariff (id in id or plan_id). Optional: id, plan_id, title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "subscription_create",
      -    "description": "Creates an unpaid subscription of a user to a plan. Instead of a new one it reuses the unpaid subscription of the user to this plan (for a recurring plan also a paused or expired one, which keeps its status), refreshes it from the current plan and clears its saved payment method, so its auto-renewal is lost. Refused when the user has an active or trial subscription to any plan (unless the requested plan is a donation plan). Gives no access, charges nothing and records no payment. Required: user_id, plan_id. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_grant",
      -    "description": "Grants a user paid access to a plan without any payment: a subscription is created, or an unpaid one of the user to this plan (for a recurring plan also a paused or expired one) is reused and refreshed from the plan, and it is activated at once for one plan period (unlimited when the plan has no period). The user is moved to the plan group, and the user and the site owner are notified. No payment is recorded. Refused when the user has an active or trial subscription to any plan (unless the requested plan is a donation plan). Required: user_id, plan_id, confirm. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_trial",
      -    "description": "Starts a free trial of a recurring plan that has trial days: the subscription gets the trial status for trial_interval days without a card or any payment. The user group is not changed. Refused when the user already has this plan active, in trial or paused, or has an active or trial subscription to any other plan. Required: user_id, plan_id. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_renew",
      -    "description": "Extends a subscription by one plan period without payment and without a payment record: from its end date, or from now when it has ended. The subscription becomes active and the user is moved to the plan group, even if it was unpaid, in trial or paused. A cancelled one is refused. When the subscription has a saved payment method, automatic charges are scheduled again, even if auto-renewal was turned off. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_change_plan",
      -    "description": "Moves a subscription to another plan at once: the new price, period and group (for an active or trial subscription) apply now, without extra payment, refund or price recalculation, and the end date stays. Auto-renewal is kept when the new plan is recurring at the same price, and later charges then follow the new plan period; otherwise it is turned off and the saved payment method is removed. PayPal subscriptions are refused. Required: subscription_id, plan_id. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_pause",
      -    "description": "Pauses a subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_resume",
      -    "description": "Resumes a paused subscription that has not ended: the user is moved back to the plan group, and automatic charges of a saved payment method are scheduled again, even if auto-renewal was turned off before the pause; the next charge may come within the hour when the period ends soon. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_autorenew_disable",
      -    "description": "Turns off auto-renewal of a subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "payment_create",
      -    "description": "Records an unpaid payment of a subscription in the module accounts only: nothing is charged, no payment system is contacted, and the subscription does not change. amount is in minor currency units; the payment method must be enabled on the site. Required: subscription_id, amount. Optional: payment_method_id, currency, transaction_id, fields."
      -  },
      -  {
      -    "const": "payment_confirm",
      -    "description": "Marks an unpaid or awaiting payment as paid without any check that money was received; nothing is charged. The subscription is activated and extended by one plan period, the user is moved to the plan group, and the payment counts in paid totals (plan_stats). The amount is not checked against the plan price. When the subscription has a saved payment method, automatic charges are scheduled again, even if auto-renewal was turned off; the next charge may come within the hour when the plan period is short. Required: payment_id, confirm."
      -  }
      -]New value: +[
      +  {
      +    "const": "plan_add",
      +    "description": "Creates a tariff plan. Required: title. Optional: description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "plan_update",
      +    "description": "Updates a tariff plan. Required: plan_id. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "plan_enable",
      +    "description": "Enables a tariff plan. Required: plan_id."
      +  },
      +  {
      +    "const": "plan_disable",
      +    "description": "Disables a tariff plan. Required: plan_id."
      +  },
      +  {
      +    "const": "legacy_item_add",
      +    "description": "Creates a legacy tariff. Required: title. Optional: description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "legacy_item_update",
      +    "description": "Updates a legacy tariff (id in id or plan_id). Required: id or plan_id. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "subscription_create",
      +    "description": "Creates an unpaid subscription of a user to a plan. Instead of a new one it reuses the unpaid subscription of the user to this plan (for a recurring plan also a paused or expired one, which keeps its status), refreshes it from the current plan and clears its saved payment method, so its auto-renewal is lost. Refused when the user has an active or trial subscription to any plan (unless the requested plan is a donation plan). Gives no access, charges nothing and records no payment. Required: user_id, plan_id. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_grant",
      +    "description": "Grants a user paid access to a plan without any payment: a subscription is created, or an unpaid one of the user to this plan (for a recurring plan also a paused or expired one) is reused and refreshed from the plan, and it is activated at once for one plan period (unlimited when the plan has no period). The user is moved to the plan group, and the user and the site owner are notified. No payment is recorded. Refused when the user has an active or trial subscription to any plan (unless the requested plan is a donation plan). Required: user_id, plan_id, confirm. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_trial",
      +    "description": "Starts a free trial of a recurring plan that has trial days: the subscription gets the trial status for trial_interval days without a card or any payment. The user group is not changed. Refused when the user already has this plan active, in trial or paused, or has an active or trial subscription to any other plan. Required: user_id, plan_id. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_renew",
      +    "description": "Extends a subscription by one plan period without payment and without a payment record: from its end date, or from now when it has ended. The subscription becomes active and the user is moved to the plan group, even if it was unpaid, in trial or paused. A cancelled one is refused. When the subscription has a saved payment method, automatic charges are scheduled again, even if auto-renewal was turned off. Required: subscription_id."
      +  },
      +  {
      +    "const": "subscription_change_plan",
      +    "description": "Moves a subscription to another plan at once: the new price, period and group (for an active or trial subscription) apply now, without extra payment, refund or price recalculation, and the end date stays. Auto-renewal is kept when the new plan is recurring at the same price, and later charges then follow the new plan period; otherwise it is turned off and the saved payment method is removed. PayPal subscriptions are refused. Required: subscription_id, plan_id. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_pause",
      +    "description": "Pauses a subscription. Required: subscription_id."
      +  },
      +  {
      +    "const": "subscription_resume",
      +    "description": "Resumes a paused subscription that has not ended: the user is moved back to the plan group, and automatic charges of a saved payment method are scheduled again, even if auto-renewal was turned off before the pause; the next charge may come within the hour when the period ends soon. Required: subscription_id."
      +  },
      +  {
      +    "const": "subscription_autorenew_disable",
      +    "description": "Turns off auto-renewal of a subscription. Required: subscription_id."
      +  },
      +  {
      +    "const": "payment_create",
      +    "description": "Records an unpaid payment of a subscription in the module accounts only: nothing is charged, no payment system is contacted, and the subscription does not change. amount is in minor currency units; the payment method must be enabled on the site. Required: subscription_id, amount. Optional: payment_method_id, currency, transaction_id, fields."
      +  },
      +  {
      +    "const": "payment_confirm",
      +    "description": "Marks an unpaid or awaiting payment as paid without any check that money was received; nothing is charged. The subscription is activated and extended by one plan period, the user is moved to the plan group, and the payment counts in paid totals (plan_stats). The amount is not checked against the plan price. When the subscription has a saved payment method, automatic charges are scheduled again, even if auto-renewal was turned off; the next charge may come within the hour when the plan period is short. Required: payment_id, confirm."
      +  }
      +]
  2. Changed3 schema fields changed
    • changedInput schema / properties / action / enum
      Previous value: -[
      -  "plan_add",
      -  "plan_update",
      -  "plan_enable",
      -  "plan_disable",
      -  "legacy_item_add",
      -  "legacy_item_update",
      -  "subscription_create",
      -  "subscription_grant",
      -  "subscription_trial",
      -  "subscription_renew",
      -  "subscription_change_plan",
      -  "subscription_pause",
      -  "subscription_resume",
      -  "subscription_autorenew_enable",
      -  "subscription_autorenew_disable",
      -  "payment_create",
      -  "payment_confirm",
      -  "payment_refund"
      -]New value: +[
      +  "plan_add",
      +  "plan_update",
      +  "plan_enable",
      +  "plan_disable",
      +  "legacy_item_add",
      +  "legacy_item_update",
      +  "subscription_create",
      +  "subscription_grant",
      +  "subscription_trial",
      +  "subscription_renew",
      +  "subscription_change_plan",
      +  "subscription_pause",
      +  "subscription_resume",
      +  "subscription_autorenew_disable",
      +  "payment_create",
      +  "payment_confirm"
      +]
    • changedInput schema / properties / action / oneOf
      Previous value: -[
      -  {
      -    "const": "plan_add",
      -    "description": "Creates a tariff plan. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "plan_update",
      -    "description": "Updates a tariff plan. Required: plan_id. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "plan_enable",
      -    "description": "Enables a tariff plan. Required: plan_id."
      -  },
      -  {
      -    "const": "plan_disable",
      -    "description": "Disables a tariff plan. Required: plan_id."
      -  },
      -  {
      -    "const": "legacy_item_add",
      -    "description": "Creates a legacy tariff. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "legacy_item_update",
      -    "description": "Updates a legacy tariff (id in id or plan_id). Optional: id, plan_id, title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      -  },
      -  {
      -    "const": "subscription_create",
      -    "description": "Creates a subscription of a user to a plan. Required: user_id, plan_id. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_grant",
      -    "description": "Grants a user access to a plan without payment. Required: user_id, plan_id, confirm. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_trial",
      -    "description": "Starts a trial subscription of a user to a plan. Required: user_id, plan_id. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_renew",
      -    "description": "Renews a subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_change_plan",
      -    "description": "Moves a subscription to another plan. Required: subscription_id, plan_id. Optional: fields."
      -  },
      -  {
      -    "const": "subscription_pause",
      -    "description": "Pauses a subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_resume",
      -    "description": "Resumes a paused subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_autorenew_enable",
      -    "description": "Turns on auto-renewal of a subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "subscription_autorenew_disable",
      -    "description": "Turns off auto-renewal of a subscription. Required: subscription_id."
      -  },
      -  {
      -    "const": "payment_create",
      -    "description": "Creates a payment for a subscription. Required: subscription_id. Optional: amount, payment_method_id, currency, transaction_id, fields."
      -  },
      -  {
      -    "const": "payment_confirm",
      -    "description": "Confirms a payment. Required: payment_id, confirm."
      -  },
      -  {
      -    "const": "payment_refund",
      -    "description": "Refunds a payment. Required: payment_id, confirm."
      -  }
      -]New value: +[
      +  {
      +    "const": "plan_add",
      +    "description": "Creates a tariff plan. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "plan_update",
      +    "description": "Updates a tariff plan. Required: plan_id. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "plan_enable",
      +    "description": "Enables a tariff plan. Required: plan_id."
      +  },
      +  {
      +    "const": "plan_disable",
      +    "description": "Disables a tariff plan. Required: plan_id."
      +  },
      +  {
      +    "const": "legacy_item_add",
      +    "description": "Creates a legacy tariff. Optional: title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "legacy_item_update",
      +    "description": "Updates a legacy tariff (id in id or plan_id). Optional: id, plan_id, title, description, type, price, price_old, is_discount, is_advantage, interval, period, trial_interval, group_to, group_back, text_advantage, advantage_items, fields."
      +  },
      +  {
      +    "const": "subscription_create",
      +    "description": "Creates an unpaid subscription of a user to a plan. Instead of a new one it reuses the unpaid subscription of the user to this plan (for a recurring plan also a paused or expired one, which keeps its status), refreshes it from the current plan and clears its saved payment method, so its auto-renewal is lost. Refused when the user has an active or trial subscription to any plan (unless the requested plan is a donation plan). Gives no access, charges nothing and records no payment. Required: user_id, plan_id. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_grant",
      +    "description": "Grants a user paid access to a plan without any payment: a subscription is created, or an unpaid one of the user to this plan (for a recurring plan also a paused or expired one) is reused and refreshed from the plan, and it is activated at once for one plan period (unlimited when the plan has no period). The user is moved to the plan group, and the user and the site owner are notified. No payment is recorded. Refused when the user has an active or trial subscription to any plan (unless the requested plan is a donation plan). Required: user_id, plan_id, confirm. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_trial",
      +    "description": "Starts a free trial of a recurring plan that has trial days: the subscription gets the trial status for trial_interval days without a card or any payment. The user group is not changed. Refused when the user already has this plan active, in trial or paused, or has an active or trial subscription to any other plan. Required: user_id, plan_id. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_renew",
      +    "description": "Extends a subscription by one plan period without payment and without a payment record: from its end date, or from now when it has ended. The subscription becomes active and the user is moved to the plan group, even if it was unpaid, in trial or paused. A cancelled one is refused. When the subscription has a saved payment method, automatic charges are scheduled again, even if auto-renewal was turned off. Required: subscription_id."
      +  },
      +  {
      +    "const": "subscription_change_plan",
      +    "description": "Moves a subscription to another plan at once: the new price, period and group (for an active or trial subscription) apply now, without extra payment, refund or price recalculation, and the end date stays. Auto-renewal is kept when the new plan is recurring at the same price, and later charges then follow the new plan period; otherwise it is turned off and the saved payment method is removed. PayPal subscriptions are refused. Required: subscription_id, plan_id. Optional: fields."
      +  },
      +  {
      +    "const": "subscription_pause",
      +    "description": "Pauses a subscription. Required: subscription_id."
      +  },
      +  {
      +    "const": "subscription_resume",
      +    "description": "Resumes a paused subscription that has not ended: the user is moved back to the plan group, and automatic charges of a saved payment method are scheduled again, even if auto-renewal was turned off before the pause; the next charge may come within the hour when the period ends soon. Required: subscription_id."
      +  },
      +  {
      +    "const": "subscription_autorenew_disable",
      +    "description": "Turns off auto-renewal of a subscription. Required: subscription_id."
      +  },
      +  {
      +    "const": "payment_create",
      +    "description": "Records an unpaid payment of a subscription in the module accounts only: nothing is charged, no payment system is contacted, and the subscription does not change. amount is in minor currency units; the payment method must be enabled on the site. Required: subscription_id, amount. Optional: payment_method_id, currency, transaction_id, fields."
      +  },
      +  {
      +    "const": "payment_confirm",
      +    "description": "Marks an unpaid or awaiting payment as paid without any check that money was received; nothing is charged. The subscription is activated and extended by one plan period, the user is moved to the plan group, and the payment counts in paid totals (plan_stats). The amount is not checked against the plan price. When the subscription has a saved payment method, automatic charges are scheduled again, even if auto-renewal was turned off; the next charge may come within the hour when the plan period is short. Required: payment_id, confirm."
      +  }
      +]
    • changedInput schema / properties / confirm / description
      Previous value: -"Pass true only after the user approves this change. Required by: subscription_grant, payment_confirm, payment_refund."New value: +"Pass true only after the user approves this change. Required by: subscription_grant, payment_confirm."
  3. Added

TDQS

A4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already flag this as destructive and not read-only, and the description adds substantial extra context: no action charges or refunds money on its own, grant/trial/renew/plan change/payment confirm hand out paid access without payment, and auto-renewal can charge the saved card, possibly within the hour, and is silently re-enabled by renew/resume/payment confirm. These are exactly the side effects an agent must know before calling a destructive write tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, which is good, but the second sentence is a dense run-on with a nested parenthetical ('...possibly within the hour when the period ends soon (also turned back on by renew, resume and payment confirmation...)') that is hard to parse. Two long sentences for a 16-action tool is defensible in size but poorly structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 26-parameter, 16-action mutation tool with no output schema, the description covers the critical risk surface (no money movement, unpaid access grants, auto-renewal surprises). Per-action parameter requirements are delegated to the schema, which is reasonable, though a pointer to subscriptions_read for lookup and to docs_tool for the fields object would round it out.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 73% and the oneOf entries already document required/optional fields per action, so the parameter layer is largely self-contained. The description itself adds no syntax or format detail for parameters such as amount, confirm, or the loosely typed price/price_old fields, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific set of write verbs and resources: 'Creates and updates tariff plans and subscriptions', then enumerates the operation families (grants, trials, renew, change plan, pause/resume, record/confirm payments). This makes it immediately distinguishable from subscriptions_read and subscriptions_delete without needing the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when each action applies but never states explicit when-to-use/when-not-to-use rules versus alternatives (e.g. read vs write, or docs_tool for extra fields). The per-action preconditions are present, but they live in the schema's oneOf entries rather than in the description, leaving routing guidance implicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.