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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_embeddings"
}
}Input 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)