Skip to main content
Glama

lock_workflow

Capture a provenance lock for a saved workflow by recording model file hashes, custom node git commits, and ComfyUI version to enable exact reproduction.

Instructions

Capture a provenance lock for a saved workflow so it can be exactly reproduced later. Walks the workflow's model loaders (CheckpointLoaderSimple, UNETLoader, VAELoader, LoraLoader, ControlNetLoader, etc.), SHA-256s every referenced model file, records the git commit currently checked out for every custom node pack the workflow's class_types come from, and captures ComfyUI's reported version. Writes <filename>.lock.json next to the workflow in ComfyUI's user library. Requires a local install (COMFYUI_PATH) — SHA-256 needs raw file bytes and pack commits come from custom_nodes/*/.git/HEAD. Pair with verify_workflow_lock later to detect drift.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesWorkflow filename in the ComfyUI user library (e.g. 'my_workflow.json'). The lock is written as '<filename>.lock.json' alongside.
Behavior4/5

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

No annotations exist, so the description fully discloses behavior: walking specific loaders, SHA-256 hashing, recording commits, writing a lock file. It lacks mention of overwrite behavior or potential duration, but is otherwise thorough.

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 a single, well-organized paragraph that front-loads the purpose, then details actions, and ends with requirements. Every sentence provides essential information with no waste.

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

Completeness5/5

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

Given the lack of output schema, the description still fully explains what the tool produces (a lock file) and covers all relevant aspects: inputs, process, dependencies, and pairing with a sibling tool. No gaps remain.

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 covers 100% with a description, and the tool description adds context like 'Workflow filename in ComfyUI user library' and lock file naming convention, enhancing understanding beyond 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 captures a provenance lock for exact reproducibility. It specifies actions like walking model loaders, SHA-256 hashing, and recording git commits, distinguishing it from the sibling tool verify_workflow_lock.

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

Usage Guidelines4/5

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

The description explicitly mentions prerequisites (local install with COMFYUI_PATH) and pairs with verify_workflow_lock. It advises when to use, though it could explicitly mention not to use for remote workflows.

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

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