hotmart_products_list
List Hotmart products with filters for status, format, and pagination to manage your catalog.
Instructions
List Products. Example: hotmart_products_list(max_results=10).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_results | No | Max results per page | |
| page_token | No | Pagination token for the next page | |
| id_ | No | Product ID | |
| status | No | Status do produto. | |
| format_ | No | Formato do produto. | |
| select | No | Custom field selection in response |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/hotmart_mcp/tools/products.py:11-66 (handler)The actual handler function for hotmart_products_list. It accepts optional parameters (max_results, page_token, id_, status, format_, select), builds query params, and calls the GET /products/api/v1/products endpoint via the shared HotmartClient.
async def hotmart_products_list( max_results: Optional[int] = None, page_token: Optional[str] = None, id_: Optional[int] = None, status: Optional[str] = None, format_: Optional[str] = None, select: Optional[str] = None, ) -> str: """List Products. Example: hotmart_products_list(max_results=10). Args: max_results: Max results per page page_token: Pagination token for the next page id_: Product ID status: Status do produto. Allowed values (case-sensitive, pass EXACTLY as listed): - `DRAFT` - `ACTIVE` - `PAUSED` - `NOT_APPROVED` - `IN_REVIEW` - `DELETED` - `CHANGES_PENDING_ON_PRODUCT` format_: Formato do produto. Allowed values (case-sensitive, pass EXACTLY as listed): - `EBOOK` - `SOFTWARE` - `MOBILE_APPS` - `VIDEOS` - `AUDIOS` - `TEMPLATES` - `IMAGES` - `ONLINE_COURSE` - `SERIAL_CODES` - `ETICKET` - `ONLINE_SERVICE` - `ONLINE_EVENT` - `BUNDLE` - `COMMUNITY` select: Custom field selection in response""" endpoint = "/products/api/v1/products" 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 status is not None: params["status"] = status if format_ is not None: params["format"] = format_ 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:196-228 (schema)ProductStatus and ProductFormat StrEnum types define the allowed enum values for the status and format_ parameters of hotmart_products_list.
class ProductStatus(StrEnum): """ Status do produto """ DRAFT = 'DRAFT' ACTIVE = 'ACTIVE' PAUSED = 'PAUSED' NOT_APPROVED = 'NOT_APPROVED' IN_REVIEW = 'IN_REVIEW' DELETED = 'DELETED' CHANGES_PENDING_ON_PRODUCT = 'CHANGES_PENDING_ON_PRODUCT' class ProductFormat(StrEnum): """ Formato do produto """ EBOOK = 'EBOOK' SOFTWARE = 'SOFTWARE' MOBILE_APPS = 'MOBILE_APPS' VIDEOS = 'VIDEOS' AUDIOS = 'AUDIOS' TEMPLATES = 'TEMPLATES' IMAGES = 'IMAGES' ONLINE_COURSE = 'ONLINE_COURSE' SERIAL_CODES = 'SERIAL_CODES' ETICKET = 'ETICKET' ONLINE_SERVICE = 'ONLINE_SERVICE' ONLINE_EVENT = 'ONLINE_EVENT' BUNDLE = 'BUNDLE' COMMUNITY = 'COMMUNITY' - src/hotmart_mcp/server.py:25-37 (registration)Automatic discovery and registration of the hotmart_products_list tool. server.py iterates over all modules in hotmart_mcp.tools and registers every public async function (including hotmart_products_list) via mcp.tool().
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-14 (helper)Shared get_client() singleton used by the handler to obtain the HotmartClient instance that performs the HTTP request.
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 functions from products.py (including hotmart_products_list) so they can be discovered by the server registration loop.
"""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