comfyui-mcp
Version:
Local-first, agent-native control plane for ComfyUI — MCP server + autonomous sidebar agent that drives your live graph in natural language on ANY LLM: Claude/ChatGPT/Gemini on your subscription (no API key), free local models via Ollama (fully offline),
41 lines • 1.98 kB
JavaScript
import { generate3d } from "../services/generate-3d.js";
/**
* `generate_image (action:"3d")` — the handler the standalone 3D tool used to
* carry (0.50.0 slice 16), unchanged apart from losing its own registration.
*
* 3D model generation via the connected ComfyUI's hosted partner 3D nodes
* (Tripo / Meshy / Rodin / Hunyuan3D), reusing the same machinery as
* list_api_nodes (action:"generate"). See ../services/generate-3d.ts for the
* path-selection rationale and capability detection. Same service call, same
* JSON payload; only the `next:` hint names the new call forms. The try/catch
* moved OUT to the dispatcher in generate-image.ts.
*/
export async function generate3dAction(args) {
const result = await generate3d(args);
return {
content: [
{
type: "text",
text: JSON.stringify({
status: "enqueued",
prompt_id: result.prompt_id,
queue_remaining: result.queue_remaining,
// #1037 — a 200 from /prompt does not mean every output was accepted;
// ComfyUI queues the branches that validate and reports the rest.
...(result.rejectedOutputs
? { rejected_outputs: result.rejectedOutputs }
: {}),
node: result.class_type,
display_name: result.display_name,
category: result.category,
formats: result.formats,
alternatives: result.alternatives,
notes: result.notes,
workflow: result.workflow,
next: 'Poll queue (action:"status") / get_history (action:"list") with the prompt_id; the 3D model file is written to the ComfyUI output directory when the job completes.',
}, null, 2),
},
],
};
}
//# sourceMappingURL=generate-3d.js.map