Skip to main content
Glama

get_subscriptions_summary

Retrieves a summary of subscriptions with optional filters by product ID, subscriber code, or date range.

Instructions

Subscription Summary

Retorna o resumo das assinaturas.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
max_resultsNoNúmero máximo de resultados por página
page_tokenNoToken de paginação para a próxima página
product_idNoID do produto
subscriber_codeNoCódigo do assinante
accession_dateNoData de adesão inicial (timestamp em milissegundos)
end_accession_dateNoData de adesão final (timestamp em milissegundos)
date_next_chargeNoData da próxima cobrança (timestamp em milissegundos)
selectNoSeleção de campos customizados na resposta

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Handler function for get_subscriptions_summary tool. Calls Hotmart API endpoint /payments/api/v1/subscriptions/summary with optional query parameters and returns JSON.
    async def get_subscriptions_summary(
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        product_id: Optional[int] = None,
        subscriber_code: Optional[int] = None,
        accession_date: Optional[int] = None,
        end_accession_date: Optional[int] = None,
        date_next_charge: Optional[int] = None,
        select: Optional[str] = None,
    ) -> str:
        """Subscription Summary
        
        Retorna o resumo das assinaturas.
        
        Args:
            max_results: Número máximo de resultados por página
            page_token: Token de paginação para a próxima página
            product_id: ID do produto
            subscriber_code: Código do assinante
            accession_date: Data de adesão inicial (timestamp em milissegundos)
            end_accession_date: Data de adesão final (timestamp em milissegundos)
            date_next_charge: Data da próxima cobrança (timestamp em milissegundos)
            select: Seleção de campos customizados na resposta"""
        endpoint = "/payments/api/v1/subscriptions/summary"
        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 subscriber_code is not None:
            params["subscriber_code"] = subscriber_code
        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 date_next_charge is not None:
            params["date_next_charge"] = 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: get_subscriptions_summary is discovered automatically since it's an exported async function in the tools.subscriptions module.
    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
  • Module exports: get_subscriptions_summary is exported in __all__ for the tools package.
    __all__ = ["get_subscriptions", "get_subscriptions_summary", "get_subscription_transactions", "get_subscriber_purchases", "cancel_subscription", "batch_cancel_subscriptions", "reactivate_subscription", "batch_reactivate_subscriptions", "change_subscription_due_day"]
Behavior2/5

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

No annotations are provided, so the description must cover behavioral aspects. It does not mention read-only status, authentication requirements, rate limits, or pagination behavior. The tool likely fetches data, but the description omits critical safety and operational details.

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?

The description is very short (two lines), which is concise, but it lacks substance. The primary content is a title and a short sentence. While front-loaded, the brevity comes at the cost of informativeness; it feels underspecified rather than efficiently written.

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

Completeness2/5

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

Given the tool has 8 optional parameters and a complex sibling set, the description is insufficient. It does not clarify what the summary contains (e.g., aggregated metrics, per-product stats) or how parameters filter results. The existence of an output schema reduces the need to describe return values, but the description should still provide context on the nature of the summary.

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 coverage is 100%, so the description does not need to repeat parameter definitions. However, the description adds no meaning beyond the schema—it does not explain how parameters like 'product_id' or 'select' affect the summary. Baseline score of 3 is appropriate given full schema documentation.

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

Purpose4/5

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

The description states it returns a summary of subscriptions, which clearly indicates the verb (retorna) and resource (subscriptions). However, it does not specify what kind of summary (e.g., counts, financial), which limits precision. Among siblings like 'get_subscriptions' (likely list individual subscriptions) and 'get_sales_summary', the purpose is distinguishable but could be more explicit.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives like 'get_subscriptions' or 'get_sales_summary'. There is no mention of context, prerequisites, or exclusions, leaving the agent to infer usage from the tool name alone.

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