get_event_info
Retrieves details of a specific event by its ID, with optional custom field selection.
Instructions
Event Info
Retorna informações de um evento.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| event_id | Yes | ID do evento | |
| select | No | Seleção de campos customizados na resposta |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/hotmart_mcp/tools/tickets.py:11-27 (handler)The main handler function for the get_event_info tool. It makes an HTTP GET request to /events/api/v1/{event_id}/info and returns the JSON response.
async def get_event_info( event_id: int, select: Optional[str] = None, ) -> str: """Event Info Retorna informações de um evento. Args: event_id: ID do evento select: Seleção de campos customizados na resposta""" endpoint = f"/events/api/v1/{event_id}/info" params = {} 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/tools/tickets.py:8-8 (registration)Exports get_event_info in the __all__ list, making it discoverable by the auto-registration mechanism in server.py.
__all__ = ["get_event_info", "get_event_participants"] - src/hotmart_mcp/server.py:21-37 (registration)Generic tool discovery and registration: iterates over all tool modules (including tickets.py) and registers every public async function as an MCP tool 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:1-14 (helper)Shared helper providing get_client() lazy singleton used by get_event_info to make HTTP requests.
"""Shared lazy singleton for the Hotmart API client.""" from __future__ import annotations from hotmart_mcp.client import HotmartClient _client: HotmartClient | None = None def get_client() -> HotmartClient: global _client if _client is None: _client = HotmartClient() return _client - src/hotmart_mcp/tools/__init__.py:1-9 (registration)Re-exports all tool functions from tickets.py (including get_event_info) via wildcard import, enabling discovery by server.py.
"""Auto-generated: re-exports all tool functions.""" from .club import * # noqa: F401,F403 from .coupons import * # noqa: F401,F403 from .negotiation import * # noqa: F401,F403 from .products import * # noqa: F401,F403 from .sales import * # noqa: F401,F403 from .subscriptions import * # noqa: F401,F403 from .tickets import * # noqa: F401,F403