Lingie.Mcp
这是一个将灵姬(Lingie)客户端生成能力封装为 MCP 工具的服务器,让 AI Agent 能通过标准 MCP 协议调用本地/云端工作流生成图片、视频、音频并取回文件。
检查灵姬本地 API 与 ComfyUI 引擎健康状态(
lingie_health)列出可用工作流并查看参数模式(
lingie_list_workflows、lingie_workflow_capabilities)执行工作流生成图片/视频/音频,支持阻塞等待或异步提交(
lingie_run_workflow)查询任务状态、取回结果并下载输出到本地(
lingie_run_status、lingie_run_result)取消生成任务(
lingie_cancel_run)上传本地图片/视频/音频文件供图生图、参考图、首帧等使用(
lingie_upload_file)配置网关凭证后,可列出模型并调用第三方模型生成图片/视频(
lingie_list_models、lingie_generate_image、lingie_generate_video)查询/取消网关任务,估价灵力值消耗与余额(
lingie_task_status、lingie_cancel_task、lingie_estimate_cost、lingie_spirit_balance)
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Lingie.McpGenerate an image of a cyberpunk cat sitting in neon rain."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Lingie.Mcp — 灵姬 MCP 服务器
把灵姬客户端(Lingie.BlazorHybrid)的生成能力封装成 MCP(Model Context Protocol)工具,让任何支持 MCP 的 AI Agent(ZCode、Claude Desktop、Cursor 等)可以直接调用灵姬生成图片、视频、音频。
零第三方依赖:纯 Node.js(≥ 18)单文件实现,无需
npm installstdio 传输:换行分隔 JSON-RPC 2.0,符合 MCP 标准规范
零改动接入:直接复用灵姬内置的本地 HTTP API,不需要修改灵姬代码
AI Agent ──(MCP stdio)──> Lingie.Mcp/server.mjs ──(HTTP 127.0.0.1)──> 灵姬客户端
│ │
│ ┌──────────┴──────────┐
│ 外部工作流 API :17856 AI应用网关 :58100
│ (本地 ComfyUI 引擎) (本地/云端/三方模型)
└── 输出文件下载到本地,绝对路径返回给 Agent前置条件
灵姬客户端正在运行。
在灵姬 设置 → 本地 API 中开启「外部工作流 API」(对应
%LOCALAPPDATA%\Lingie\settings.json的LocalApiEnabled,端口LocalApiPort默认17856)。若设置了
LocalApiBearerToken,MCP 服务器会自动读取;也可用环境变量LINGIE_API_TOKEN显式覆盖。无需手动启动 ComfyUI 引擎:提交工作流时若引擎未运行,灵姬会自动拉起(首次约 30-120 秒)。
Related MCP server: ComfyUI MCP Server
接入 AI Agent
把本仓库克隆到任意目录(下例假设克隆到 C:\MCP\Lingie.Mcp,请替换为你的实际路径):
git clone https://github.com/MechaBabyAi/Lingie.Mcp.git C:\MCP\Lingie.McpZCode / Claude Desktop / Cursor(通用 mcpServers 格式)
{
"mcpServers": {
"lingie": {
"command": "node",
"args": ["C:\\MCP\\Lingie.Mcp\\server.mjs"]
}
}
}环境变量需要时放进同一个节点,例如:
"env": { "LINGIE_API_PORT": "17856", "LINGIE_API_TOKEN": "..." }
手动冒烟测试
node Lingie.Mcp/server.mjs
# 再输入一行 MCP 初始化消息(或直接在 Agent 中配置后查看工具列表)启动日志输出在 stderr:会打印工作流 API 地址、Token 状态、网关状态与输出目录。
工具清单
默认暴露「工作流 API」工具(本地 ComfyUI 引擎,免费):
工具 | 说明 |
| 检查灵姬本地 API 与本地 ComfyUI 引擎是否在线(未运行时提交会自动拉起) |
| 列出可用工作流(图片/视频/音频生成等) |
| 查看某工作流的参数模式(类型/必填/默认值/可选值/提交方式) |
| 执行工作流:引擎未运行时自动拉起(首次约 30-120 秒);约 20 秒内完成则直接返回输出文件本地绝对路径,否则自动降级返回 |
| 轮询 |
| 查询任务状态与进度(不下载输出) |
| 取消任务(注意:会中断本地引擎当前正在执行的任务) |
| 上传本地文件到 ComfyUI 输入目录(供图生图/参考图/首帧等参数使用) |
当网关凭证可用时(二选一),额外暴露「AI 应用网关」(:58100)工具,覆盖本地/云端 ComfyUI 与第三方模型(DALL·E、Midjourney、Seedream、Kling、Vidu、Wan 等,按灵力值计费):
灵姬内开启(推荐):灵姬 设置 → 本地 API → 打开「Agent (MCP) 网关接入」,灵姬会自动把凭证写入
%LOCALAPPDATA%\Lingie\mcp-credentials.json,本服务器自动发现(约 10 秒内生效,无需重启);环境变量:设置
LINGIE_GATEWAY_APP_KEY+LINGIE_GATEWAY_USER_TOKEN。
工具 | 说明 |
| 列出网关可用模型(model_code) |
| 一键调用模型生成图片/视频(约 20 秒未完成自动降级返回 |
| 网关任务状态/取消 |
| 灵力值估价/余额 |
环境变量
变量 | 默认 | 说明 |
| settings.json 的 | 工作流 API 端口 |
| settings.json 的 | 工作流 API Bearer Token |
|
| 输出文件下载目录 |
|
| 阻塞等待的安全窗口(毫秒):超过仍未完成就提前降级返回 |
|
| 本地文件日志路径,设为 |
| 灵姬签发的 | 网关 AppKey(与 |
| 无 | 网关 Bearer 用户令牌 |
|
| 网关地址 |
Agent 典型调用流程
1. lingie_health → 确认灵姬在线(引擎未运行也可提交,会自拉起)
2. lingie_list_workflows → 找到想用的工作流(如"文生图")
3. lingie_workflow_capabilities → 了解参数怎么填
4. (可选)lingie_upload_file → 图生图先上传参考图
5. lingie_run_workflow { params } → 提交生成:
├─ 约 20 秒内完成 → 直接拿到输出文件本地路径,结束
└─ 超过约 20 秒 → 拿到 run_id(降级返回,任务后台继续)
5a. 循环 lingie_run_result { run_id } → 进行中则稍后再查;
完成时返回输出文件本地路径
6. Agent 直接 Read / 处理该路径下的图片或视频为什么会"降级"?多数 MCP 宿主(ZCode、Claude Desktop 等)对单次工具调用有 ~30 秒超时, 超时后客户端会掐断调用并丢弃返回值,但任务在灵姬后台仍在继续。与其被掐断, 不如主动提前返回任务 id 让 Agent 轮询。视频生成等长任务几乎总会走降级路径,属正常现象。
已知限制
工作流 API 只走本地 ComfyUI 引擎:云端 ComfyUI / 第三方模型(Kling 等计费模型)需走网关工具。网关凭证在灵姬 设置 → 本地 API → 「Agent (MCP) 网关接入」一键签发(写入
mcp-credentials.json),或由管理员通过环境变量提供。引擎自动拉起:通过 MCP 提交工作流时,若本地 ComfyUI 引擎未运行,灵姬会自动拉起(
ComfyUIService.EnsureRunningAsync)。首次启动约 30-120 秒(加载 custom nodes),后续提交无需等待。如果文件指纹校验失败(FingerprintBlocked),自拉起会中止并返回错误,需在灵姬 UI 中修复 ComfyUI 路径配置。启动参数与脱敏补丁不可通过外部修改:ComfyUI 进程的启动参数(
--port、--disable-metadata、--preview-method none等)由灵姬 C# 端BuildComfyUIArguments硬编码构建,外部 API 调用者只能提交工作流节点参数(提示词、图片、尺寸等),不接触进程启动参数。安全补丁(server.py/prompt_pipe_server.py)和 Named Pipe 提交通道也由灵姬内部管理,外部无法篡改。lingie_cancel_run是全局中断:本地 ComfyUI 一次只执行一个任务,取消会中断当前正在执行的任务(灵姬LocalApiService的行为,MCP 侧已在工具描述中向 Agent 说明)。工作流与授权:非免费工作流需要灵姬内有效的授权(
IsFree/ 许可校验),由灵姬自行处理。生成的输出文件默认保存在
%LOCALAPPDATA%\Lingie\mcp-outputs\{run_id}\,灵姬侧 ComfyUI 原始输出仍在Comfy_User/Comfy_Output。
日志
MCP 服务器被 Agent 拉起后 stderr 不可见,因此所有工具调用都会追加写入本地日志文件(默认 %LOCALAPPDATA%\Lingie\mcp-server.log),每次调用记录三行信息:
2026-08-30T12:00:00.000Z [12345] 调用开始 tool=lingie_run_workflow 参数={"workflow_id":"WF-..."}
2026-08-30T12:03:21.000Z [12345] 调用完成 tool=lingie_run_workflow 耗时=201000ms失败时记录 调用失败 ... 错误=<原因>。日志仅存本机,注意其中可能包含提示词等创作内容;用 LINGIE_MCP_LOG=off 可关闭。灵姬侧 58100 网关任务会出现在灵姬任务列表(来源 lingie-mcp),17856 工作流任务只体现在 ComfyUI 队列与输出目录。
Available Tools
8 toolslingie_cancel_runA
取消一个灵姬生成任务。注意:本地 ComfyUI 引擎一次只执行一个任务,取消操作会中断当前正在执行的任务(不一定是该 run_id 对应的任务)。请确认后再调用。
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | 要取消的 run_id |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals a critical non-obvious behavior: the engine executes one task at a time, and canceling may interrupt the currently running task rather than the requested one. This is exactly the kind of side-effect transparency an agent needs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is short, direct, and front-loads the purpose. Every clause adds value: the action, the engine limitation, the possible mismatch between run_id and the affected task, and the confirmation requirement. No unnecessary filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter cancellation tool, the description covers the most important contextual risk and explains why caution is needed. It does not describe return behavior or error cases, but the operation is simple enough that the core context is largely complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with run_id documented as '要取消的 run_id'. The tool description adds no additional parameter format or value constraints, but the schema already provides sufficient meaning, so the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action, '取消' (cancel), on a specific resource, a Lingji generation task. It is immediately distinguishable from sibling tools like run_status or run_workflow, and the warning emphasizes the real effect of the operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives clear usage context: cancellation is global to the local ComfyUI engine and may affect a different task than the specified run_id. It explicitly tells the agent to confirm before calling, which is strong guidance, though it doesn't enumerate exact when-to-use vs. when-not-to-use scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_healthA
检查灵姬客户端本地 API 的可用性:服务是否在线、本地 ComfyUI 引擎是否运行、是否需要认证。开始生成前建议先调用。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
There are no annotations, so the description bears the full burden. It discloses the checks performed (online status, ComfyUI engine, auth) and recommends calling before generation, which implies a safe read-only operation. However, it does not explicitly state that the call has no side effects or describe what the response contains or failure looks like.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single front-loaded sentence: it opens with the core purpose, lists the specific checks, and ends with the practical usage recommendation. Every clause adds value, and there is no redundant filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter health-check tool, the description is largely complete: it states what is checked and when to use it. There is no output schema, so the agent must discover the response format at runtime, but the simplicity of the tool keeps this gap minor.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool accepts zero parameters and the input schema is empty, so no parameter documentation is needed. The description adds no parameter details, which is appropriate here; the baseline of 4 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('检查' / check) and resource ('灵姬客户端本地 API 的可用性'), and enumerates exactly what is verified: service online, local ComfyUI running, auth required. This clearly distinguishes it from siblings that list workflows, run workflows, or manage runs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives explicit usage context: '开始生成前建议先调用' (recommended to call before starting generation). It does not mention when not to use it or alternatives, but no alternative is relevant for a health-check tool, so the guidance is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_list_workflowsA
列出灵姬中可用的工作流(图片生成/视频生成/音频等)。返回 id、名称、类别、是否免费。生成分两步:先用 lingie_workflow_capabilities 查看参数,再用 lingie_run_workflow 提交。
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden. '列出' and the return fields imply a read-only discovery operation, and the two-step note prevents confusing it with execution, but it does not mention any limits, auth expectations, or pagination.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences deliver purpose, output fields, and follow-up workflow. No filler or redundancy, and the most important information is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter list tool with no output schema, the description provides the purpose, output fields, and next steps, which is enough to invoke and interpret it. It stops short of explaining potential edge cases or response variations, but those are not necessary for correct usage here.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has no parameters and 100% schema coverage, so there is nothing to document. The description correctly focuses on output and follow-up tools rather than inventing parameter guidance.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource ('列出...工作流') and immediately scopes it to available generation types. It also names the return fields (id, name, category, free), which distinguishes it from parameter-inspection and submission tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It clearly places the tool in a workflow: use workflow_capabilities to inspect parameters and run_workflow to submit. This tells the agent where list_workflows fits, though it does not explicitly state exclusion cases or when to prefer a sibling.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_run_resultA
查询灵姬生成任务(run_id)并取回结果:仍在生成时返回状态与进度;已完成时把输出文件下载到本地并返回文件路径列表。配合 lingie_run_workflow 超时降级后的轮询使用。
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | lingie_run_workflow 返回的 run_id |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears the behavioral disclosure burden. It discloses the key side effect: when the task is complete, output files are downloaded locally and a file-path list is returned. It does not mention repeated-call behavior or error semantics, but the main non-obvious behavior is surfaced.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single dense sentence, front-loaded with the action and resource, then the conditional result behavior, then the usage context. There is no filler or redundant restatement.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With only one parameter and no output schema, the definition covers the main states (running vs completed), the delivered artifact (file paths), and the intended workflow position. It could add an explicit note about how it differs from lingie_run_status, but that is a minor gap given the tool's low complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the schema already explains that run_id is the value returned by lingie_run_workflow. The description only mentions run_id in passing and adds no extra semantic detail beyond the schema, so the baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb-resource pair: query a generation task by run_id and retrieve its result. It clearly separates the two conditional behaviors—status/progress while generating versus downloading output files and returning paths on completion—which distinguishes it from the status-only sibling lingie_run_status.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly says it is meant to be used with polling after lingie_run_workflow times out, giving concrete context for when to call it. It does not explicitly contrast it with lingie_run_status, but the intended usage position is clear enough.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_run_statusA
查询灵姬生成任务(run_id)的当前状态、进度与输出清单(只查询,不下载输出文件)。
| Name | Required | Description | Default |
|---|---|---|---|
| run_id | Yes | lingie_run_workflow 返回的 run_id |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It clearly discloses a read-only, no-download behavior ('只查询,不下载输出文件') and states what information is returned (status, progress, output list). This is strong behavioral transparency for a simple query tool, though it does not cover error cases or rate limits.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that states the purpose and the key behavioral qualifier with no redundancy. Every word contributes to understanding the tool.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter query tool with complete schema coverage, the description covers the purpose, read-only nature, and the scope of returned data. It could be more explicit about the return format, but the description is largely complete for making the correct call.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, and the run_id parameter is already documented as the run_id returned by lingie_run_workflow. The description adds no additional meaning beyond what the schema provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description declares a specific verb '查询' (query) and precisely defines the object: the current status, progress, and output list of a Lingji generation task identified by run_id. It also differentiates itself from siblings by explicitly stating it does not download output files, which distinguishes it from lingie_run_result.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage context is implied: the run_id is described as coming from lingie_run_workflow, and the description clarifies this tool is query-only and does not download files. However, it does not explicitly name alternatives or state when-not-to-use it (e.g., if downloads are needed, use lingie_run_result instead).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_run_workflowA
在灵姬中执行一个工作流(本地 ComfyUI 引擎)。提交后默认等待完成并返回输出文件的本地路径;若约 20 秒内未完成(MCP 宿主对单次调用通常只有 ~30 秒超时,超时会被掐断丢结果),自动降级为返回 run_id,任务在后台继续,用 lingie_run_result 轮询并在完成后取回本地文件。设 wait=false 立即返回 run_id。取消用 lingie_cancel_run(注意:会中断本地引擎当前正在执行的任务)。
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | 是否阻塞等待完成,默认 true(约 20 秒未完成自动降级返回,可用 LINGIE_MCP_MAX_BLOCK_MS 调整) | |
| params | No | 工作流参数,键为 lingie_workflow_capabilities 返回的参数名(特殊类型按其 submission_hint 提交,如 "节点ID.字段" 形式)。 | |
| workflow_id | Yes | 工作流 id,来自 lingie_list_workflows | |
| timeout_seconds | No | wait=true 时的总等待上限秒数,默认 1200,最大 3600 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden and meets it. It discloses the default blocking wait, ~20-second auto-degradation to run_id, ~30-second MCP host timeout, background continuation, and the side effect that canceling interrupts the local engine's current task.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three dense sentences cover submission, waiting, timeout degradation, background continuation, immediate mode, and cancellation. The core action is front-loaded and every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex async execution tool with no annotations, this description is complete: it tells the agent what results to expect, when to fall back, how to avoid losing results to timeouts, and how to cancel. The absence of an output schema is compensated by explicitly stating that local output paths or a run_id are returned.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value by explaining wait semantics beyond the schema, mentioning LINGIE_MCP_MAX_BLOCK_MS tuning, and tying params to lingie_workflow_capabilities parameter names with submission_hint formats.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: executing a workflow in the local ComfyUI engine. It also distinguishes itself from siblings by contrasting submission behavior with lingie_run_result polling and lingie_cancel_run cancellation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly explains when to use this tool and when to use alternatives: submit with run_workflow, poll with lingie_run_result after background degradation, cancel with lingie_cancel_run. It also covers the wait=false immediate-return mode.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_upload_fileA
把本地文件(图片/视频/音频)上传到灵姬的 ComfyUI 输入目录,供图生图、参考图、首帧等参数使用。返回的 filename 填入相应参数即可。
| Name | Required | Description | Default |
|---|---|---|---|
| filename | No | 可选:上传后使用的文件名(默认用原文件名) | |
| file_path | Yes | 要上传的本地文件绝对路径 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden. It discloses the core effect (uploading to ComfyUI input directory) and the return value (filename), which is critical for downstream use. However, it does not disclose edge behaviors like overwrite policy, file-type validation, size limits, or whether directories are created.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no filler. The action is stated immediately, followed by the practical downstream guidance about using the returned filename. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a low-complexity tool with 2 params and no output schema, the description adequately covers the essential context: what is uploaded, where, and how the result is consumed. It does not promise optional behavior or leave critical return information unexplained. A small gap is the lack of mention of potential failures or prerequisites like ComfyUI availability.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both file_path and filename. The description adds mild value by restricting file types to images/video/audio, which is not present in the schema, but it does not otherwise enrich the parameter meanings.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description names a specific verb (上传/upload), a precise resource (local files to ComfyUI input directory), and states the intended use cases (image-to-image, reference image, first frame). It is clearly distinguishable from all siblings, none of which perform file upload.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when this tool is appropriate: before invoking workflows that require local media as input, such as image-to-image or reference-image params. It does not need to state alternatives because no sibling handles upload, though it could have been more explicit about the order of operations relative to lingie_run_workflow.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
lingie_workflow_capabilitiesA
查看指定工作流的参数模式(每个参数的名称、类型、是否必填、默认值、可选值与提交方式)。提交 lingie_run_workflow 前务必先调用本工具了解如何填 params。
| Name | Required | Description | Default |
|---|---|---|---|
| workflow_id | Yes | 工作流 id,来自 lingie_list_workflows |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. The verb '查看' indicates a read-only lookup, and the phrase 'before submitting lingie_run_workflow' clarifies it does not execute the workflow. It does not explicitly state 'no side effects' or mention permissions, but the wording is sufficient for a safe introspection tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with no filler. The first sentence front-loads the purpose and output contents; the second sentence gives the critical usage trigger. Every phrase earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter introspection tool with no output schema, the description is complete: it states exactly what information is returned, references the prerequisite relationship with lingie_run_workflow, and the schema supplies the input source. Nothing critical is missing for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema covers 100% of parameters and already describes workflow_id as coming from lingie_list_workflows, so the baseline is 3. The description adds no extra semantic nuance about the input parameter; its mentions of names, types, etc. refer to the output content, not the input.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('查看' / view) and a specific resource ('指定工作流的参数模式' / specified workflow's parameter schema), and enumerates exactly what information is returned (name, type, required, default, enum values, submission method). It also positions itself as a prerequisite to lingie_run_workflow, which clearly distinguishes it from the sibling execution and status tools.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when to call it: '提交 lingie_run_workflow 前务必先调用本工具' (must call this tool before submitting lingie_run_workflow) to understand how to fill params. This gives clear, actionable usage context, though it does not mention when not to use it or name alternative tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct role in the workflow lifecycle: health check, listing workflows, inspecting parameters, running, polling, downloading, canceling, and uploading. The only real overlap is between lingie_run_result and lingie_run_status, both of which query a run_id and report status/progress, but run_result additionally downloads outputs.
All tools share the 'lingie_' prefix and use snake_case, which makes the set feel unified. However, the verb_noun pattern is not consistent: lingie_health and lingie_workflow_capabilities lack an action verb, and lingie_run_result reads more like a run command than a result-fetching operation.
Eight tools is well-scoped for this domain. The set covers health checking, workflow discovery, parameter introspection, run submission, status/result retrieval, cancellation, and file upload without unnecessary duplication.
The tool surface covers the full generation lifecycle: check the service, discover workflows, inspect required parameters, upload input files, run the workflow, poll for progress, download results, and cancel if needed. There are no obvious dead ends for the intended use case.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
Generate AI images and videos from any compatible MCP client.
Create images & video from any MCP agent — 17 models, spend limits, one URL.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes litmedia.ai text-to-image and image-to-video generation tools via MCP, enabling AI agents to generate images and videos directly from prompts.1MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to generate and iteratively refine images, audio, and video through natural conversation using a local ComfyUI instance.AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to generate and iteratively refine images, audio, and video through natural conversation using a local ComfyUI instance.Apache 2.0
- AlicenseAqualityDmaintenanceMCP server that provides image generation, captioning, and tagging via ComfyUI API, configurable for agent tools.43MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/MechaBabyAi/Lingie.Mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server