Skip to main content
Glama

hotmart_subscriptions_list

Retrieve a list of subscriptions from Hotmart with filters like product, plan, status, and date range. Use this to manage subscription data, not for payment events.

Instructions

Get Subscriptions. Example: hotmart_subscriptions_list(max_results=10). Don't use this for payment events — use hotmart_subscription_transactions_list for charges/refunds per subscription.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_resultsNoMax results per page
page_tokenNoPagination token for the next page
product_idNoProduct ID
planNoNomes dos planos. Pass a JSON array of strings, e.g. `['ABC123XY', 'DEF456ZW']`.
plan_idNoID do plano
accession_dateNoSubscription start date (lower bound). Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
end_accession_dateNoSubscription start date (upper bound). Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
statusNoSubscription status.
subscriber_codeNoSubscriber code. Format: alphanumeric Hotmart code (ex: `H123A4B5`, not UUID, not int)
subscriber_emailNoEmail do assinante
transactionNoTransaction code
trialNoFiltrar por trial
cancelation_dateNoData de cancelamento inicial. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
end_cancelation_dateNoData de cancelamento final. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
date_next_chargeNoData da próxima cobrança inicial. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
end_date_next_chargeNoData da próxima cobrança final. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
selectNoCustom field selection in response

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The async function `hotmart_subscriptions_list` that implements the tool logic. It builds query params from optional arguments and calls the GET /payments/api/v1/subscriptions endpoint via the shared client, returning JSON.
    async def hotmart_subscriptions_list(
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        product_id: Optional[int] = None,
        plan: Optional[list[str]] = None,
        plan_id: Optional[int] = None,
        accession_date: Optional[int] = None,
        end_accession_date: Optional[int] = None,
        status: Optional[str] = None,
        subscriber_code: Optional[str] = None,
        subscriber_email: Optional[str] = None,
        transaction: Optional[str] = None,
        trial: Optional[bool] = None,
        cancelation_date: Optional[int] = None,
        end_cancelation_date: Optional[int] = None,
        date_next_charge: Optional[int] = None,
        end_date_next_charge: Optional[int] = None,
        select: Optional[str] = None,
    ) -> str:
        """Get Subscriptions. Example: hotmart_subscriptions_list(max_results=10). Don't use this for payment events — use `hotmart_subscription_transactions_list` for charges/refunds per subscription.
        
        Args:
            max_results: Max results per page
            page_token: Pagination token for the next page
            product_id: Product ID
            plan: Nomes dos planos. Pass a JSON array of strings, e.g. `['ABC123XY', 'DEF456ZW']`.
            plan_id: ID do plano
            accession_date: Subscription start date (lower bound). Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
            end_accession_date: Subscription start date (upper bound). Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
            status: Subscription status.
            Allowed values (case-sensitive, pass EXACTLY as listed):
              - `ACTIVE`
              - `INACTIVE`
              - `DELAYED`
              - `CANCELLED_BY_CUSTOMER`
              - `CANCELLED_BY_SELLER`
              - `CANCELLED_BY_ADMIN`
              - `STARTED`
              - `OVERDUE`
            subscriber_code: Subscriber code. Format: alphanumeric Hotmart code (ex: `H123A4B5`, not UUID, not int)
            subscriber_email: Email do assinante
            transaction: Transaction code
            trial: Filtrar por trial
            cancelation_date: Data de cancelamento inicial. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
            end_cancelation_date: Data de cancelamento final. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
            date_next_charge: Data da próxima cobrança inicial. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
            end_date_next_charge: Data da próxima cobrança final. Unix timestamp in **milliseconds** (not seconds, not ISO). Ex: `1730419200000` = 2024-11-01 00:00 UTC. Python: `int(datetime(2024,11,1).timestamp() * 1000)`.
            select: Custom field selection in response"""
        endpoint = "/payments/api/v1/subscriptions"
        params = {}
        if max_results is not None:
            params["max_results"] = max_results
        if page_token is not None:
            params["page_token"] = page_token
        if product_id is not None:
            params["product_id"] = product_id
        if plan is not None:
            params["plan"] = plan
        if plan_id is not None:
            params["plan_id"] = plan_id
        if accession_date is not None:
            params["accession_date"] = accession_date
        if end_accession_date is not None:
            params["end_accession_date"] = end_accession_date
        if status is not None:
            params["status"] = status
        if subscriber_code is not None:
            params["subscriber_code"] = subscriber_code
        if subscriber_email is not None:
            params["subscriber_email"] = subscriber_email
        if transaction is not None:
            params["transaction"] = transaction
        if trial is not None:
            params["trial"] = trial
        if cancelation_date is not None:
            params["cancelation_date"] = cancelation_date
        if end_cancelation_date is not None:
            params["end_cancelation_date"] = end_cancelation_date
        if date_next_charge is not None:
            params["date_next_charge"] = date_next_charge
        if end_date_next_charge is not None:
            params["end_date_next_charge"] = end_date_next_charge
        if select is not None:
            params["select"] = select
        result = await get_client().get(endpoint, params=params)
        return json.dumps(result, indent=2)
  • Auto-discovery registration: `_discover_and_register_tools` iterates all modules in `hotmart_mcp.tools` and registers every public async function (including `hotmart_subscriptions_list`) via `mcp.tool()`.
    def _discover_and_register_tools() -> int:
        """Import all modules under hotmart_mcp.tools and register async functions."""
        registered = 0
        for module_info in pkgutil.iter_modules(tools_pkg.__path__, prefix=f"{tools_pkg.__name__}."):
            if module_info.name.endswith("__init__"):
                continue
            module = importlib.import_module(module_info.name)
            for name, obj in inspect.getmembers(module, iscoroutinefunction):
                if name.startswith("_"):
                    continue
                mcp.tool()(obj)
                registered += 1
        return registered
  • The function signature acts as the schema: parameters like max_results, status, subscriber_code, dates (all Optional) define the input schema for the tool.
    async def hotmart_subscriptions_list(
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        product_id: Optional[int] = None,
        plan: Optional[list[str]] = None,
        plan_id: Optional[int] = None,
        accession_date: Optional[int] = None,
        end_accession_date: Optional[int] = None,
        status: Optional[str] = None,
        subscriber_code: Optional[str] = None,
        subscriber_email: Optional[str] = None,
        transaction: Optional[str] = None,
        trial: Optional[bool] = None,
        cancelation_date: Optional[int] = None,
        end_cancelation_date: Optional[int] = None,
        date_next_charge: Optional[int] = None,
        end_date_next_charge: Optional[int] = None,
        select: Optional[str] = None,
  • `get_client()` is the helper that provides the shared HotmartClient singleton used by the handler to make the HTTP request.
    """Shared lazy singleton for the Hotmart API client."""
    
    from __future__ import annotations
    
    from hotmart_mcp.client import HotmartClient
    
    _client: HotmartClient | None = None
    
    
    def get_client() -> HotmartClient:
        global _client
        if _client is None:
            _client = HotmartClient()
        return _client
  • Disambiguation hint in the code generator: maps `hotmart_subscriptions_list` to a hint telling the LLM not to use it for payment events.
    "hotmart_subscriptions_list":
        "Don't use this for payment events — use `hotmart_subscription_transactions_list` for charges/refunds per subscription.",
    "hotmart_subscription_transactions_list":
        "Don't use this for the subscription list itself — use `hotmart_subscriptions_list`.",
Behavior2/5

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

No annotations are present, so the description carries full burden for behavioral disclosure. It only says 'Get Subscriptions' with an example, but does not disclose authentication needs, rate limits, pagination behavior, or any side effects. For a listing tool with no annotations, this is insufficient transparency.

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

Conciseness4/5

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

The description is very concise at two sentences. The first sentence is minimal but the second effectively differentiates from a sibling. While efficient, it could be restructured to front-load more useful context for the agent. Still, no unnecessary words.

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

Completeness3/5

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

Given the tool's complexity (17 parameters, no required fields, output schema present), the description is too brief. It lacks guidance on typical use cases, filtering strategies, or how pagination works. The parameter descriptions in the schema are detailed, but the tool description itself does not synthesize this into actionable context for the agent.

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 100%, so the schema already documents all 17 parameters. The description adds a usage example with 'max_results=10', but does not provide additional semantic context beyond what the schema offers. Baseline is 3 due to high coverage, and the description adds minimal extra value.

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 clearly states 'Get Subscriptions' and provides a usage example. It explicitly distinguishes from the sibling tool 'hotmart_subscription_transactions_list' by stating not to use it for payment events, ensuring the agent selects the correct tool.

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

Usage Guidelines4/5

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

The description gives explicit guidance on when not to use the tool ('Don't use this for payment events') and names the alternative ('use hotmart_subscription_transactions_list'). However, it does not elaborate on broader usage context or when to choose this tool over other subscription-related siblings like cancel or reactivate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thaleslaray/hotmart-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server