Skip to main content
Glama

free_memory

Free up VRAM by unloading models and resetting the executor cache in local ComfyUI. Non-destructive, applies at next queue iteration without interrupting running jobs.

Instructions

Ask the local ComfyUI to unload models / reset its executor cache.

Wraps comfy free (ComfyUI's own POST /free). Pair with system_stats for the before/after.

Args: unload_models: True (default) unloads all models from VRAM. unload_models=False with free_memory left default requests NOTHING — a deliberate no-op, not "reset cache, keep models". free_memory: also resets the executor cache; None (default) follows unload_models, so a bare call asks for both. True with unload_models=False is rejected: ComfyUI cannot reset the cache without unloading everything.

NOT IMMEDIATE, never destructive: applied when the queue worker next iterates — does not interrupt a running job, so this cannot stop one (job(action="cancel") does). Returns what was REQUESTED, not a measurement — re-check system_stats. NOT diverted by COMFYUI_URL/COMFYUI_HOST — same comfy_target_note behavior as system_stats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
free_memoryNo
unload_modelsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses that the operation is NOT IMMEDIATE, never destructive, does not interrupt running jobs, returns only the requested action rather than a measurement, and is not diverted by COMFYUI_URL/COMFYUI_HOST.

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?

Though longer than average, every sentence earns its place: the first line states purpose, the Args section resolves ambiguous parameter combinations, and the caveats section prevents misuse. The structure is front-loaded and scannable with bolded callouts.

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 no annotations and no output schema, the description is complete for correct invocation. It covers what the tool does, what it does not do, parameter semantics, return semantics, environment behavior, and relevant sibling alternatives.

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

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain the parameters, and it does. It details unload_models default behavior, the deliberate no-op combination, the semantics of free_memory=None following unload_models, and the rejected True-with-unload_models=False case.

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 opens with a specific verb and resource: 'unload models / reset its executor cache' via local ComfyUI. It distinguishes itself from related tools by explicitly referencing system_stats for before/after and job(action='cancel') for interruption.

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

Usage Guidelines5/5

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

The description clearly states when to use this tool and when not to: it is not immediate)Skip, cannot interrupt a running job, and job(action='cancel') is the alternative for stopping. It also advises pairing with system_stats for measurements, giving the agent actionable routing guidance.

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