Skip to main content
Glama

get_modules

Retrieve modules of a Hotmart membership area by providing the subdomain. Optionally filter extra modules or select specific fields.

Instructions

Get Modules

Retorna os módulos da área de membros.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subdomainYesSubdomínio da área de membros
is_extraNoFiltrar módulos extras
selectNoSeleção de campos customizados na resposta

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_modules handler function. Makes a GET request to /club/api/v1/modules with subdomain, is_extra, and select query params, then returns JSON response.
    async def get_modules(
        subdomain: str,
        is_extra: Optional[bool] = None,
        select: Optional[str] = None,
    ) -> str:
        """Get Modules
        
        Retorna os módulos da área de membros.
        
        Args:
            subdomain: Subdomínio da área de membros
            is_extra: Filtrar módulos extras
            select: Seleção de campos customizados na resposta"""
        endpoint = "/club/api/v1/modules"
        params = {}
        if subdomain is not None:
            params["subdomain"] = subdomain
        if is_extra is not None:
            params["is_extra"] = is_extra
        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 schema/input types: subdomain (str, required), is_extra (Optional[bool]), and select (Optional[str]). The return type is str (JSON).
    async def get_modules(
        subdomain: str,
        is_extra: Optional[bool] = None,
        select: Optional[str] = None,
    ) -> str:
        """Get Modules
        
        Retorna os módulos da área de membros.
        
        Args:
            subdomain: Subdomínio da área de membros
            is_extra: Filtrar módulos extras
            select: Seleção de campos customizados na resposta"""
        endpoint = "/club/api/v1/modules"
        params = {}
        if subdomain is not None:
            params["subdomain"] = subdomain
        if is_extra is not None:
            params["is_extra"] = is_extra
        if select is not None:
            params["select"] = select
        result = await get_client().get(endpoint, params=params)
        return json.dumps(result, indent=2)
  • Automatic registration: _discover_and_register_tools iterates all modules in hotmart_mcp.tools, finds async functions (like get_modules), and registers them 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
  • get_client() helper returns a singleton HotmartClient instance, used by get_modules to make the API call.
    def get_client() -> HotmartClient:
        global _client
        if _client is None:
            _client = HotmartClient()
        return _client
  • get_modules is exported via __all__ in the club module.
    __all__ = ["get_modules", "get_module_pages", "get_students", "get_student_progress"]
Behavior2/5

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

No annotations are provided, so the description carries full burden. It only states the tool returns modules, but does not disclose any behavioral traits such as read-only nature, rate limits, pagination, or authentication needs. The output schema exists but is not mentioned.

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

Conciseness3/5

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

The description is very short (two sentences) but lacks substance. It repeats the title in the first sentence and provides minimal value. It is concise but at the cost of completeness.

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?

Despite having 3 parameters and an output schema, the description fails to provide context about the output, typical use cases, or any prerequisites. It is incomplete for a tool with moderate complexity.

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?

The input schema covers 100% of parameter descriptions, and the tool description adds no additional meaning beyond the schema. The baseline is 3, indicating adequate but not enhanced parameter semantics.

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 modules of the member area ('Retorna os módulos da área de membros'). It specifies the resource (modules) and scope (member area), but does not differentiate from sibling tools like get_module_pages.

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 is provided on when to use this tool versus alternatives. Given the existence of many sibling tools, such as get_module_pages or get_product_offers, explicit usage context would be beneficial.

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