get_subscription_plan
Referência da tool get_subscription_plan do MCP Server do bitERP (Assinaturas).
Get Subscription Plan · Assinaturas
| Somente leitura | Destrutiva | Idempotente | Mundo aberto |
|---|---|---|---|
| Sim | Não | Sim | 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.
Gets a subscription plan by UUID or record number. Provide exactly one of id or record_number.
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. |
id | string (UUID) | Não | Subscription plan UUID |
record_number | integer | Não | The tenant-scoped subscription plan record number to retrieve |
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 | — |
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.
Além dos parâmetros obrigatórios, a tool exige exatamente um destes: id, record_number. Sem nenhum, ou com mais de um, ela responde ValidationError. O exemplo usa record_number.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "get_subscription_plan",
"arguments": {
"tenant": "minha-empresa",
"record_number": 3
}
}
}
