create_subscription_plan
Referência da tool create_subscription_plan do MCP Server do bitERP (Assinaturas).
Create Subscription Plan · Assinaturas
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Não | Não | Não | Não |
Descrição
A descrição abaixo é a que o servidor publica, em inglês, e é o texto que o agente lê para decidir quando usar a tool.
Creates a subscription plan for the organization.
Parâmetros
| Parâmetro | Tipo | Obrigatório | Descrição |
|---|---|---|---|
tenant | string | Sim | Defines which tenant will have data read or changed. Use list_tenants first and prefer the returned tenant slug. Writes are permanent, so when the user has more than one tenant you must confirm the tenant before any write and never assume or reuse a previous choice without confirmation. UUID is accepted only when already known safely. |
product_id | string (UUID) ou null | Não | Linked product UUID |
reference_code | string ou null | Não | Optional plan reference code |
name | string | Sim | Plan name |
description | string | Não | Plan description |
billing_interval | string | Sim | Billing interval Valores: day, week, month, year. |
billing_interval_count | integer | Não | Billing interval count (default 1) |
amount | decimal (string ou number) | Sim | Plan amount as decimal string (numeric(18,6), e.g. "1500.000000"); a JSON number with at most 6 decimals is also accepted, must be non-negative |
currency | string ou null | Não | ISO 4217 currency code |
trial_period_days | integer | Não | Trial period in days |
is_blocked | boolean | Não | Whether the plan is blocked |
Resposta
O structuredContent da resposta traz os campos abaixo (até dois níveis; o schema completo está no outputSchema publicado no tools/list).
| Campo | Tipo | Descrição |
|---|---|---|
id | string (UUID) | — |
tenant_id | string (UUID) | — |
product_id | string (UUID) ou null | — |
record_number | integer | — |
reference_code | string ou null | — |
name | string | — |
description | string ou null | — |
billing_interval | string | Valores: day, week, month, year. |
billing_interval_count | integer | — |
amount | string | — |
currency | string ou null | — |
trial_period_days | integer | — |
is_blocked | boolean | — |
metadata | object | — |
created_at | string (date-time) | — |
updated_at | string (date-time) | — |
deleted_at | string (date-time) ou null | — |
_tenant | object | — |
_tenant.id | string (UUID) | — |
_tenant.slug | string | — |
_tenant.company_name | string | — |
Exemplo de chamada
Requisição tools/call com os parâmetros obrigatórios. Os valores são ilustrativos: troque minha-empresa pelo tenant devolvido por list_tenants e cada <...> por um valor real.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_subscription_plan",
"arguments": {
"tenant": "minha-empresa",
"name": "<name>",
"billing_interval": "day",
"amount": "100.00"
}
}
}
