list_embeddings
Retrieve available text embedding names for use in prompts within ComfyUI workflows.
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 for the 'list_embeddings' tool. It is decorated with @mcp.tool() for registration and implements the core logic by calling the get_embeddings() helper.@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 retrieves the list of embeddings from the ComfyUI API endpoint '/embeddings'.def get_embeddings() -> list: """Get available embeddings.""" return comfy_get("/embeddings")
- src/comfy_mcp_server/tools/__init__.py:23-28 (registration)The register_all_tools function calls register_discovery_tools(mcp), which registers the list_embeddings tool among others.def register_all_tools(mcp): """Register all tools with the MCP server.""" register_system_tools(mcp) register_discovery_tools(mcp) register_workflow_tools(mcp) register_execution_tools(mcp)
- src/comfy_mcp_server/__init__.py:91-92 (registration)Calls register_all_tools(mcp) to register all tools including list_embeddings.# Register all tools register_all_tools(mcp)