Skip to main content
Glama

get_subscriber_purchases

Retrieve all purchases made by a specific subscriber using their subscriber code.

Instructions

Subscriber Purchases

Retorna as compras de um assinante.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriber_codeYesCódigo do assinante

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function that executes the tool - makes a GET request to retrieve purchases for a given subscriber code.
    async def get_subscriber_purchases(
        subscriber_code: str,
    ) -> str:
        """Subscriber Purchases
        
        Retorna as compras de um assinante.
        
        Args:
            subscriber_code: Código do assinante"""
        endpoint = f"/payments/api/v1/subscriptions/{subscriber_code}/purchases"
        result = await get_client().get(endpoint)
        return json.dumps(result, indent=2)
  • Tool registration mechanism - dynamically discovers all async functions (including get_subscriber_purchases) from the tools package and registers them with FastMCP.
    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
  • Imports the get_client helper used to make the HTTP request to the Hotmart API.
    from hotmart_mcp._shared import get_client
Behavior2/5

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

No annotations are present, so the description must bear the full burden. It only states that the tool returns purchases, with no mention of read-only behavior, authentication needs, rate limits, or any side effects. This is insufficient for an agent to understand operational constraints.

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 extremely short and front-loaded, with no wasted words. However, it could benefit from a slightly more informative single sentence without significant bloat.

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?

With a single required parameter and an output schema, the description is minimally adequate. However, it does not clarify what kind of purchases are returned or any filters, leaving some ambiguity for an 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 coverage is 100% as the only parameter, subscriber_code, is described ("Código do assinante"). The tool description adds no additional meaning beyond the schema, so scoring at baseline 3 is appropriate.

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 clearly states it returns subscriber purchases ("Retorna as compras de um assinante"), using a specific verb and resource. However, it does not differentiate itself from sibling tools like get_subscriptions or get_subscription_transactions, which might overlap in purpose.

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?

No guidance is provided on when to use this tool versus alternatives, nor any context about prerequisites or when not to use it. The description is purely functional.

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