Skip to main content
Glama

get_product_plans

Retrieve subscription plans for a specific product by providing the product ID. Supports pagination and filtering by plan ID.

Instructions

Get Product Plans

Retorna os planos de assinatura de um produto.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
product_idYesID do produto
max_resultsNoNúmero máximo de resultados por página
page_tokenNoToken de paginação para a próxima página
id_NoID do plano
selectNoSeleção de campos customizados na resposta

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for 'get_product_plans'. It takes product_id (required), max_results, page_token, id_, and select as optional parameters. Calls GET /products/api/v1/products/{product_id}/plans and returns the JSON response.
    async def get_product_plans(
        product_id: int,
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        id_: Optional[int] = None,
        select: Optional[str] = None,
    ) -> str:
        """Get Product Plans
        
        Retorna os planos de assinatura de um produto.
        
        Args:
            product_id: ID do produto
            max_results: Número máximo de resultados por página
            page_token: Token de paginação para a próxima página
            id_: ID do plano
            select: Seleção de campos customizados na resposta"""
        endpoint = f"/products/api/v1/products/{product_id}/plans"
        params = {}
        if max_results is not None:
            params["max_results"] = max_results
        if page_token is not None:
            params["page_token"] = page_token
        if id_ is not None:
            params["id"] = id_
        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: product_id (int, required), max_results (Optional[int]), page_token (Optional[str]), id_ (Optional[int]), select (Optional[str]). Output is always str (JSON).
    async def get_product_plans(
        product_id: int,
        max_results: Optional[int] = None,
        page_token: Optional[str] = None,
        id_: Optional[int] = None,
        select: Optional[str] = None,
    ) -> str:
  • Automatic registration: _discover_and_register_tools() iterates all modules in hotmart_mcp.tools, finds async functions, and registers them via mcp.tool()(obj). This is how get_product_plans gets registered.
    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 __all__ export list includes 'get_product_plans', making it publicly accessible from the products module.
    __all__ = ["list_products", "get_product_offers", "get_product_plans"]
  • The get_client() helper provides the shared HotmartClient singleton used by get_product_plans to make HTTP requests.
    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, so the description must carry the burden of behavioral disclosure. It only states the basic function without mentioning side effects, idempotency, pagination behavior, or required permissions. For a read operation, it fails to confirm that it is non-destructive.

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 very concise: one sentence. It is front-loaded with the title-like 'Get Product Plans'. While brevity is positive, it could include more useful details without becoming verbose.

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?

Given the tool has 5 parameters including pagination (page_token, max_results) and an output schema (not shown), the description is adequate but incomplete. It does not mention pagination or that the primary parameter product_id is required, though the schema provides this. The agent can infer details but the description could be more helpful.

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 the input schema already fully documents all parameters. The description adds no additional meaning beyond the schema. Baseline is 3 as per guidelines.

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 the tool returns subscription plans for a product ('Retorna os planos de assinatura de um produto'). It specifies the verb 'get' and the resource 'product plans'. However, it does not differentiate from a similar sibling like get_product_offers, though the resource names differ.

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. It lacks context about prerequisites, typical use cases, or exclusions. The agent must infer usage solely from the tool name and schema.

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