Skip to main content
Glama

Close Workspace

close_workspace
Destructive

Shut down a workspace’s worker to free its pool slot. This discards all documents, unsaved changes, and handles in that workspace.

Instructions

Shut down a workspace's worker and free its pool slot. All of that workspace's documents, unsaved changes, and handles are lost. The default workspace can be closed too (its worker respawns clean on next use).

If name is the use_workspace selection, the selection returns to "default", whoever closes it. A call pinned with workspace never moves the selection otherwise: closing your own pinned workspace leaves the pin as it is, so your next call pinned to that name gets a fresh, empty worker (old handles fail). current is the workspace this call ran in (as in list_workspaces), selected the server-wide selection after the close. Returns {closed: , workspace: , current: , selected: }.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>"
    },
    "name": "close_workspace"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYes
workspaceNoRun this call in this named workspace

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.7
    • addedInput schema / properties / workspace
      Added value: +{
      +  "default": "",
      +  "description": "Run this call in this named workspace",
      +  "title": "Workspace",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes far beyond destructiveHint=true by naming exactly what is destroyed (documents, unsaved changes, handles), what respawns (default worker comes back clean), and how the server-wide selection and pins behave after the close — including that stale handles will fail on a fresh worker.

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?

Front-loads the destructive consequence in sentence one, then layers selection semantics and the return shape. Dense but every sentence carries information; the middle paragraph on pins is slightly twisty and requires a second read.

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 destructive, no-output-schema tool, the description covers the full contract: what is lost, respawn behavior, selection/pin side effects, and the exact return shape — nothing an agent needs to call this correctly is missing.

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 coverage is only 50% (the `name` param has no schema description), and the description compensates by explaining `name` in terms of the use_workspace selection and pinning behavior, plus clarifying the meaning of the returned `current` and `selected` fields.

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+resource ('Shut down a workspace's worker and free its pool slot') and immediately scopes it against the many siblings (close_document, restart_worker, use_workspace) by naming the worker and pool slot rather than documents or session state.

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 clear operational context — the default workspace can also be closed, and closing the current selection resets it to 'default' — which tells an agent when this is safe/appropriate. It does not explicitly contrast with close_document or restart_worker, which would be needed for a 5.

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

Deploy Server

Other Tools