Skip to main content
Glama

model_sleep

Destructive

Suspend a vLLM inference engine to free GPU memory between request bursts and stop serving until wake. Use level 1 to offload weights to CPU RAM, level 2 to discard them, or dry_run to preview.

Instructions

[WRITE][risk=high] Suspend the engine via Sleep Mode (it stops serving requests).

Frees GPU memory between bursts. level=1 offloads the weights to CPU RAM and wakes fast; level=2 discards them, so waking reloads from disk. The engine serves nothing until model_wake. Pass dry_run=True to preview.

Sleep Mode exists only on servers started with VLLM_SERVER_DEV_MODE=1; on any other server this reports that the route is absent rather than failing vaguely.

Args: level: 1 to offload weights to CPU RAM, 2 to discard them (default 1). dry_run: If True, preview without suspending. target: Inference target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
levelNo
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and readOnlyHint=false; the description goes well beyond them by explaining what is actually destroyed/freed at each level, that level=2 causes a disk reload on wake, that dry_run previews without suspending, and how errors surface on non-dev servers. This is exactly the extra context annotations cannot carry.

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

Conciseness4/5

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

The [WRITE][risk=high] tag is front-loaded and the purpose sentence comes before the mechanics, which is good ordering. The Args block repeats the level=1/level=2 explanation already given in the prose, a minor redundancy that keeps it from a 5.

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?

For a mode-switching write with no output schema, the description covers the safety profile, the state transition, wake-up implications, the dev-mode prerequisite, and the failure mode. An agent has everything needed to decide and to call it correctly.

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 0%, so the description must carry all meaning, and it defines all three parameters including the defaulted level, the dry_run preview behavior, and target ('omit for the default'). It could have clarified the accepted string form of target, but the coverage gap is largely closed.

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?

States a specific verb and resource ('Suspend the engine via Sleep Mode') plus the operational consequence ('it stops serving requests'). The name model_sleep is vague on its own, but the description disambiguates it against siblings like model_wake, model_is_sleeping, and model_undeploy.

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?

Gives a clear use case ('Frees GPU memory between bursts'), names the counterpart tool to undo it ('The engine serves nothing until model_wake'), and states the prerequisite (VLLM_SERVER_DEV_MODE=1). It does not compare against other memory-freeing siblings such as scale_to_zero or model_undeploy, so the agent must still infer when Sleep Mode is preferable to those.

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