list_embeddings
Retrieve available text embedding names for use in ComfyUI prompts to enhance AI-generated content with specific styles or characteristics.
Instructions
List available text embeddings.
Returns list of embedding names that can be used in prompts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- The handler function implementing the list_embeddings tool. It lists text embeddings by calling the get_embeddings helper, with error handling.@mcp.tool() def list_embeddings(ctx: Context = None) -> list: """List available text embeddings. Returns list of embedding names that can be used in prompts. """ if ctx: ctx.info("Listing embeddings...") try: return get_embeddings() except Exception as e: return [f"Error: {e}"]
- src/comfy_mcp_server/api.py:262-264 (helper)Supporting helper function that fetches embeddings from the ComfyUI API endpoint.def get_embeddings() -> list: """Get available embeddings.""" return comfy_get("/embeddings")
- src/comfy_mcp_server/tools/__init__.py:26-26 (registration)Calls register_discovery_tools which defines and registers the list_embeddings tool among others.register_discovery_tools(mcp)