Skip to main content
Glama

write_workflow

Validate and write ComfyUI workflow JSON files to Spark. Checks that content includes nodes and links arrays before saving.

Instructions

Write a workflow JSON file to spark. Validates that content parses as JSON with nodes+links arrays.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesWorkflow filename, must end with .json
contentYesFull JSON content
overwriteNoRequired to replace an existing file
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must carry the burden. It adds meaningful validation behavior (content must parse as JSON with nodes+links arrays), but does not disclose overwrite semantics, error handling, or permissions. The overwrite flag exists only in the schema, not in the description, leaving gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two short, front-loaded sentences. Every word earns its place: it states the action, destination, and a key validation detail without fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 3 parameters, all documented in the schema, and no output schema, so the description doesn't need to explain return values. It covers the core action and validation, but leaves out overwrite behavior (though the schema covers it) and the meaning of 'spark' is somewhat ambiguous. Overall, it is fairly complete for a simple write tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

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 a structural requirement for the content parameter (must have nodes+links arrays), which is not present in the schema's property description. This enriches the meaning of the content parameter beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool writes a workflow JSON file to spark, with a specific verb and resource. It also mentions validation, which distinguishes it from sibling tools like read_workflow or queue_workflow.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the verb 'write' and the resource 'workflow JSON file', but there is no explicit guidance on when to use this vs. alternatives, nor any mention of prerequisites like the overwrite flag being necessary for existing files. The description does not name sibling tools or provide exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

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/bernardogv/comfyui-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server