hotmart_student_progress_get
Retrieve a student's progress in a Hotmart members area by providing the user ID and subdomain. Customize field selection with optional parameters.
Instructions
Get Student Progress. Example: hotmart_student_progress_get(user_id='…').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| user_id | Yes | ID do aluno | |
| subdomain | Yes | Members area subdomain (the slug from `hotmart.com/club/<slug>` URL) | |
| select | No | Custom field selection in response |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/hotmart_mcp/tools/club.py:78-96 (handler)The actual handler function for the hotmart_student_progress_get tool. It is an async function that takes user_id, subdomain, and optional select params, calls GET /club/api/v1/users/{user_id}/lessons endpoint via the shared API client, and returns JSON-formatted result.
async def hotmart_student_progress_get( user_id: str, subdomain: str, select: Optional[str] = None, ) -> str: """Get Student Progress. Example: hotmart_student_progress_get(user_id='…'). Args: user_id: ID do aluno subdomain: Members area subdomain (the slug from `hotmart.com/club/<slug>` URL) select: Custom field selection in response""" endpoint = f"/club/api/v1/users/{user_id}/lessons" params = {} if subdomain is not None: params["subdomain"] = subdomain if select is not None: params["select"] = select result = await get_client().get(endpoint, params=params) return json.dumps(result, indent=2) - src/hotmart_mcp/models.py:929-938 (schema)LessonProgress Pydantic model used to type the response from the student progress endpoint. Contains fields like page_id, page_name, module_name, is_completed, completed_date.
class LessonProgress(BaseModel): page_id: str | None = Field(None, description='ID da página/aula') page_name: str | None = Field(None, description='Nome da página/aula') module_name: str | None = Field(None, description='Nome do módulo') is_module_extra: bool | None = Field(None, description='Se o módulo é extra') is_completed: bool | None = Field(None, description='Se a aula foi concluída') completed_date: int | None = Field( None, description='Data de conclusão (timestamp ms)' ) - src/hotmart_mcp/server.py:25-37 (registration)Automatic discovery and registration via _discover_and_register_tools(). It imports all modules under hotmart_mcp.tools (including club.py), finds all async functions that don't start with '_', and registers them as FastMCP 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 - src/hotmart_mcp/_shared.py:10-15 (helper)get_client() shared helper that provides a singleton HotmartClient instance used by the tool handler to make API calls.
def get_client() -> HotmartClient: global _client if _client is None: _client = HotmartClient() return _client - src/hotmart_mcp/tools/club.py:8-9 (registration)The __all__ export list in club.py that includes 'hotmart_student_progress_get' so it is re-exported via tools/__init__.py.
__all__ = ["hotmart_modules_list", "hotmart_module_pages_list", "hotmart_students_list", "hotmart_student_progress_get"]