Skip to main content
Glama

hotmart_negotiation_generate

Generate a negotiation for a Hotmart subscription by specifying overdue recurrences, payment type, and optional discount and document.

Instructions

Generate Negotiation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscription_idYesID da assinatura
recurrencesYesNúmeros das recorrências em atraso (1 a 5 valores). Pass a JSON array of integers, e.g. `[12345, 67890]`.
payment_typeYesPayment type para a negociação. Allowed values: 'BOLETO', 'PIX'
discountNodiscount. **Fraction between 0 and 1** (NOT percent). Ex: `0.25` = 25% off. Pass `0.10` for 10%, NOT `10`.
documentNoSubscriber's CPF or CNPJ (required when payment_method is BILLET)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main implementation of the hotmart_negotiation_generate tool. It is an async function that calls POST /payments/api/v1/installments/negotiate with subscription_id, recurrences, payment_type, optional discount and document parameters, returning the JSON response.
    async def hotmart_negotiation_generate(
        subscription_id: int,
        recurrences: list[int],
        payment_type: str,
        discount: Optional[dict] = None,
        document: Optional[str] = None,
    ) -> str:
        """Generate Negotiation.
        
        Args:
            subscription_id: ID da assinatura
            recurrences: Números das recorrências em atraso (1 a 5 valores). Pass a JSON array of integers, e.g. `[12345, 67890]`.
            payment_type: Payment type para a negociação. Allowed values: 'BOLETO', 'PIX'
            discount: discount. **Fraction between 0 and 1** (NOT percent). Ex: `0.25` = 25% off. Pass `0.10` for 10%, NOT `10`.
            document: Subscriber's CPF or CNPJ (required when payment_method is BILLET)"""
        endpoint = "/payments/api/v1/installments/negotiate"
        body = {}
        body["subscription_id"] = subscription_id
        body["recurrences"] = recurrences
        body["payment_type"] = payment_type
        if discount is not None:
            body["discount"] = discount
        if document is not None:
            body["document"] = document
        result = await get_client().post(endpoint, json=body)
        return json.dumps(result, indent=2)
  • The tool is exported via __all__ in the negotiation module, which is re-exported through tools/__init__.py (line 5).
    __all__ = ["hotmart_negotiation_generate"]
    
    
    async def hotmart_negotiation_generate(
        subscription_id: int,
        recurrences: list[int],
        payment_type: str,
        discount: Optional[dict] = None,
        document: Optional[str] = None,
    ) -> str:
        """Generate Negotiation.
        
        Args:
            subscription_id: ID da assinatura
            recurrences: Números das recorrências em atraso (1 a 5 valores). Pass a JSON array of integers, e.g. `[12345, 67890]`.
            payment_type: Payment type para a negociação. Allowed values: 'BOLETO', 'PIX'
            discount: discount. **Fraction between 0 and 1** (NOT percent). Ex: `0.25` = 25% off. Pass `0.10` for 10%, NOT `10`.
            document: Subscriber's CPF or CNPJ (required when payment_method is BILLET)"""
        endpoint = "/payments/api/v1/installments/negotiate"
        body = {}
        body["subscription_id"] = subscription_id
        body["recurrences"] = recurrences
        body["payment_type"] = payment_type
        if discount is not None:
            body["discount"] = discount
        if document is not None:
            body["document"] = document
        result = await get_client().post(endpoint, json=body)
        return json.dumps(result, indent=2)
  • Auto-discovery registration: server.py iterates all modules under hotmart_mcp.tools and registers every async coroutine function (including hotmart_negotiation_generate) via mcp.tool()(obj).
    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 get_client() helper that provides the HotmartClient singleton used by the handler to make the HTTP POST request.
    def get_client() -> HotmartClient:
        global _client
        if _client is None:
            _client = HotmartClient()
        return _client
  • The function signature defines the input schema: subscription_id (int), recurrences (list[int]), payment_type (str), discount (Optional[dict]), document (Optional[str]).
    async def hotmart_negotiation_generate(
        subscription_id: int,
        recurrences: list[int],
        payment_type: str,
        discount: Optional[dict] = None,
        document: Optional[str] = None,
    ) -> str:
        """Generate Negotiation.
        
        Args:
            subscription_id: ID da assinatura
            recurrences: Números das recorrências em atraso (1 a 5 valores). Pass a JSON array of integers, e.g. `[12345, 67890]`.
            payment_type: Payment type para a negociação. Allowed values: 'BOLETO', 'PIX'
            discount: discount. **Fraction between 0 and 1** (NOT percent). Ex: `0.25` = 25% off. Pass `0.10` for 10%, NOT `10`.
            document: Subscriber's CPF or CNPJ (required when payment_method is BILLET)"""
        endpoint = "/payments/api/v1/installments/negotiate"
        body = {}
        body["subscription_id"] = subscription_id
        body["recurrences"] = recurrences
        body["payment_type"] = payment_type
        if discount is not None:
            body["discount"] = discount
        if document is not None:
            body["document"] = document
        result = await get_client().post(endpoint, json=body)
        return json.dumps(result, indent=2)
Behavior2/5

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

Annotations are absent, and the description discloses no behavioral traits (e.g., whether it creates a record, requires authentication, or is destructive). The description is too brief to communicate any side effects or prerequisites.

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

Conciseness2/5

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

The description is extremely short (2 words), but this is under-specification rather than effective conciseness. It fails to provide necessary context, wasting the opportunity to convey purpose and usage.

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 5-parameter (3 required) input and existence of an output schema, the description is insufficient. It does not explain the tool's core function (generating a negotiation) or how it relates to subscription management. The high schema and output schema richness do not compensate for the vague description.

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%, with detailed parameter descriptions (e.g., discount specifies fraction between 0 and 1). The tool description adds no extra value beyond the schema, earning the baseline score of 3.

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

Purpose2/5

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

The description 'Generate Negotiation' is a tautology of the tool name. It does not specify the type of negotiation (e.g., for overdue subscriptions) or what the tool actually produces (e.g., a negotiation link or agreement). It lacks specific verb+resource clarity beyond the name itself.

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 on when to use this tool versus alternatives. Sibling tools include hotmart_subscription_cancel, hotmart_subscription_reactivate, and many negotiation-related apps, but the description provides no differentiation or context for appropriate use.

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