Skip to main content
Glama

reactivate_subscription

Reactivates a subscription by sending the subscriber an email link to accept within 3 days. Optionally charges immediately.

Instructions

Reactivate Subscription

Reativa uma assinatura. O assinante deve aceitar via link por e-mail (validade de 3 dias).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriber_codeYesCódigo do assinante
chargeNoCobrar imediatamente

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The `reactivate_subscription` async function is the tool handler. It sends a POST request to /payments/api/v1/subscriptions/{subscriber_code}/reactivate to reactivate a subscription. Accepts optional 'charge' body parameter and returns JSON string.
    async def reactivate_subscription(
        subscriber_code: str,
        charge: Optional[bool] = None,
    ) -> str:
        """Reactivate Subscription
        
        Reativa uma assinatura. O assinante deve aceitar via link por e-mail (validade de 3 dias).
        
        Args:
            subscriber_code: Código do assinante
            charge: Cobrar imediatamente"""
        endpoint = f"/payments/api/v1/subscriptions/{subscriber_code}/reactivate"
        body = {}
        if charge is not None:
            body["charge"] = charge
        result = await get_client().post(endpoint, json=body)
        return json.dumps(result, indent=2)
  • The function is listed in the __all__ export list, making it available for auto-discovery by the server registration mechanism.
    __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"]
  • Auto-discovery registration: _discover_and_register_tools() iterates modules, finds all async functions (including reactivate_subscription), and registers each with 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 subscriptions module is re-exported via wildcard import, making reactivate_subscription discoverable by server.py's registration loop.
    from .subscriptions import *  # noqa: F401,F403
  • The imports used by reactivate_subscription: json for serialization, Optional from typing, and get_client from the shared module.
    """Auto-generated Hotmart API tools — subscriptions."""
    
    import json
    from typing import Optional
    
    from hotmart_mcp._shared import get_client
    
    __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"]
Behavior3/5

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

The description discloses that the reactivation triggers an email link acceptance requirement with a 3-day validity, which is important behavioral context. However, it does not discuss what happens if the link expires or any other side effects. Since annotations are absent, the description carries the full burden but remains incomplete.

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

Conciseness5/5

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

The description is brief and front-loaded with the title, consisting of two short sentences after the title. Every line adds essential information, and there is no unnecessary text.

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?

The description covers the core reactivation process and the email acceptance constraint, but lacks details on prerequisites (e.g., subscription must be cancelled) and the effect of the 'charge' parameter. The presence of an output schema compensates for missing return value info, but overall completeness is moderate.

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?

Both parameters are fully described in the input schema, with subscriber_code and charge each having clear descriptions. The tool description adds no additional semantic information about the parameters or their usage 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's function as reactivating a subscription, with the additional step of subscriber acceptance via email link. The name and description distinguish it from sibling batch_reactivate_subscriptions by using singular form, indicating single subscription handling.

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 explicit guidance on when to use this tool versus alternatives like batch_reactivate_subscriptions or cancel_subscription is provided. The description only mentions a precondition (email acceptance) but does not outline scenarios where this tool is appropriate.

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