Skip to main content
Glama

get_sales_participants

Retrieve the participants of a Hotmart sale, including the producer, affiliate, and co-producer, using transaction code or other filters.

Instructions

Sales Participants

Retorna os participantes de uma venda (produtor, afiliado, coprodutor).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transactionNoCódigo da transação
transaction_statusNoStatus da transação. Values: APPROVED, BLOCKED, CANCELLED, CHARGEBACK, COMPLETE, EXPIRED, NO_FUNDS, OVERDUE, PARTIALLY_REFUNDED, PRE_ORDER, PRINTED_BILLET, PROCESSING_TRANSACTION, PROTESTED, REFUNDED, STARTED, UNDER_ANALISYS, WAITING_PAYMENT
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
start_dateNoData inicial (timestamp em milissegundos desde epoch)
end_dateNoData final (timestamp em milissegundos desde epoch)
buyer_emailNoE-mail do comprador
sales_sourceNoOrigem da venda
buyer_nameNoNome do comprador
affiliate_nameNoNome do afiliado
commission_asNoPapel de comissão do usuário autenticado. Values: PRODUCER, COPRODUCER, AFFILIATE
selectNoSeleção de campos customizados na resposta

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function for the get_sales_participants tool. Calls the Hotmart API endpoint /payments/api/v1/sales/users with optional filter parameters and returns the JSON result.
    async def get_sales_participants(
        transaction: Optional[str] = None,
        transaction_status: Optional[str] = None,
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        product_id: Optional[int] = None,
        start_date: Optional[int] = None,
        end_date: Optional[int] = None,
        buyer_email: Optional[str] = None,
        sales_source: Optional[str] = None,
        buyer_name: Optional[str] = None,
        affiliate_name: Optional[str] = None,
        commission_as: Optional[str] = None,
        select: Optional[str] = None,
    ) -> str:
        """Sales Participants
        
        Retorna os participantes de uma venda (produtor, afiliado, coprodutor).
        
        Args:
            transaction: Código da transação
            transaction_status: Status da transação. Values: APPROVED, BLOCKED, CANCELLED, CHARGEBACK, COMPLETE, EXPIRED, NO_FUNDS, OVERDUE, PARTIALLY_REFUNDED, PRE_ORDER, PRINTED_BILLET, PROCESSING_TRANSACTION, PROTESTED, REFUNDED, STARTED, UNDER_ANALISYS, WAITING_PAYMENT
            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
            start_date: Data inicial (timestamp em milissegundos desde epoch)
            end_date: Data final (timestamp em milissegundos desde epoch)
            buyer_email: E-mail do comprador
            sales_source: Origem da venda
            buyer_name: Nome do comprador
            affiliate_name: Nome do afiliado
            commission_as: Papel de comissão do usuário autenticado. Values: PRODUCER, COPRODUCER, AFFILIATE
            select: Seleção de campos customizados na resposta"""
        endpoint = "/payments/api/v1/sales/users"
        params = {}
        if transaction is not None:
            params["transaction"] = transaction
        if transaction_status is not None:
            params["transaction_status"] = transaction_status
        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 start_date is not None:
            params["start_date"] = start_date
        if end_date is not None:
            params["end_date"] = end_date
        if buyer_email is not None:
            params["buyer_email"] = buyer_email
        if sales_source is not None:
            params["sales_source"] = sales_source
        if buyer_name is not None:
            params["buyer_name"] = buyer_name
        if affiliate_name is not None:
            params["affiliate_name"] = affiliate_name
        if commission_as is not None:
            params["commission_as"] = commission_as
        if select is not None:
            params["select"] = select
        result = await get_client().get(endpoint, params=params)
        return json.dumps(result, indent=2)
  • The function signature defines the input schema (all optional parameters) and return type (str) for this tool.
    async def get_sales_participants(
        transaction: Optional[str] = None,
        transaction_status: Optional[str] = None,
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        product_id: Optional[int] = None,
        start_date: Optional[int] = None,
        end_date: Optional[int] = None,
        buyer_email: Optional[str] = None,
        sales_source: Optional[str] = None,
        buyer_name: Optional[str] = None,
        affiliate_name: Optional[str] = None,
        commission_as: Optional[str] = None,
        select: Optional[str] = None,
    ) -> str:
  • Auto-discovers and registers all async functions from tools modules (including get_sales_participants) as MCP tools.
    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
  • Exports get_sales_participants from the sales module, making it importable for tool discovery.
    __all__ = ["get_sales_history", "get_sales_summary", "get_sales_participants", "get_sales_commissions", "get_sales_price_details", "refund_sale"]
  • Shared helper that provides the HotmartClient singleton used by get_sales_participants to make the API call.
    def get_client() -> HotmartClient:
        global _client
        if _client is None:
            _client = HotmartClient()
        return _client
Behavior2/5

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

No annotations are provided, and the description only states what is returned. It does not disclose pagination behavior, rate limits, authentication requirements, or any side effects.

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 concise, consisting of two lines. It is efficient but could be better structured with headings or bullets.

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?

The tool has 13 parameters and no annotations or output schema shown. The description does not explain filtering logic, return structure, or how parameters like date range and pagination affect results.

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 schema already documents all 13 parameters. The description adds no additional meaning beyond the schema.

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 the tool returns participants of a sale (producer, affiliate, co-producer). This distinguishes it from siblings like get_sales_commissions or get_sales_history.

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, nor any exclusions or prerequisites.

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