Skip to main content
Glama

change_subscription_due_day

Changes the due day of an active or delayed subscription by providing the subscriber code and new day (1-31). Adjusts day 31 to 30 for shorter months.

Instructions

Change Due Day

Altera o dia de vencimento de uma assinatura. Somente para assinaturas ACTIVE ou DELAYED. Não disponível para trial. O dia 31 será ajustado para 30 em meses mais curtos.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subscriber_codeYesCódigo do assinante
due_dayYesNovo dia de vencimento (1-31)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The actual handler/implementation of the change_subscription_due_day tool. It makes a PATCH request to /payments/api/v1/subscriptions/{subscriber_code} with the due_day in the body.
    async def change_subscription_due_day(
        subscriber_code: str,
        due_day: int,
    ) -> str:
        """Change Due Day
        
        Altera o dia de vencimento de uma assinatura. Somente para assinaturas ACTIVE ou DELAYED. Não disponível para trial. O dia 31 será ajustado para 30 em meses mais curtos.
        
        Args:
            subscriber_code: Código do assinante
            due_day: Novo dia de vencimento (1-31)"""
        endpoint = f"/payments/api/v1/subscriptions/{subscriber_code}"
        body = {}
        body["due_day"] = due_day
        result = await get_client().patch(endpoint, json=body)
        return json.dumps(result, indent=2)
  • Auto-discovery registration in _discover_and_register_tools(). All async functions in the tools package (including change_subscription_due_day) are registered as MCP tools 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
  • Docstring and parameters schema: subscriber_code (str) and due_day (int, 1-31).
    """Change Due Day
    
    Altera o dia de vencimento de uma assinatura. Somente para assinaturas ACTIVE ou DELAYED. Não disponível para trial. O dia 31 será ajustado para 30 em meses mais curtos.
    
    Args:
        subscriber_code: Código do assinante
        due_day: Novo dia de vencimento (1-31)"""
  • The patch() helper method on HotmartClient that performs the actual HTTP PATCH request.
    async def patch(
        self,
        path: str,
        json: dict[str, Any] | None = None,
        params: dict[str, Any] | None = None,
    ) -> dict[str, Any]:
        return await self._request("PATCH", path, params=params, json=json)
Behavior4/5

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

No annotations provided, so the description shoulders disclosure. It reveals operational constraints (state restrictions, trial exclusion) and an edge case behavior (day 31 adjusts to 30). No mention of permissions or error handling, but for a simple update it is reasonably transparent.

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?

Extremely concise: a title and three short sentences. Every sentence provides key constraint information without redundancy. Properly front-loaded.

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

Completeness5/5

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

For a simple two-parameter mutation tool with an output schema, the description covers core behavior, allowed states, and a notable edge case. It is sufficient for an agent to understand and invoke correctly.

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%, so baseline is 3. The description does not add signficant meaning beyond the schema for each parameter; the behavioral note about day 31 is more transparency than parameter semantics.

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 that the tool changes the due day of a subscription and specifies constraints (only for ACTIVE or DELAYED, not trial). It distinguishes from sibling tools like cancel_subscription or reactivate_subscription by focusing on a specific attribute update.

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

Usage Guidelines4/5

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

The description explicitly restricts usage to ACTIVE or DELAYED subscriptions and excludes trials, giving clear context. It does not name alternatives, but the constraints effectively guide when to use this tool vs others.

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