Skip to main content
Glama

photoshop_close_document

Close an open Photoshop document tab, defaulting to the active file or targeting a specific document by ID. Optionally save unsaved changes before closing to clean up extra open tabs.

Instructions

Close a Photoshop document tab. Defaults to the active document; pass document_id to close a specific open file.

Use when: the user is done with a file, or when cleaning up extra open tabs after photoshop_list_documents. Do NOT use when: you only need to switch tabs — use photoshop_set_active_document.

Returns: confirmation that the document closed. Preconditions: target document is open. Side effects: closes that tab; save=true writes unsaved changes first.

Input Schema

NameRequiredDescriptionDefault
saveNoWhether to save changes before closing
document_idNoOptional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool activates that document before running so a UI tab switch cannot retarget the edit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.2

TDQS

A4.9/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 of behavioral disclosure, and it succeeds. It states preconditions (target document open), side effects (closes the tab), the save behavior ('save=true writes unsaved changes first'), and the return value. It also reveals a nuanced behavior: passing document_id activates the document before closing to prevent UI tab-switch retargeting.

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 uses five short, labeled sections (use when, do NOT use, returns, preconditions, side effects), front-loading the core action and default behavior in the first sentence. Every sentence earns its place; there is no filler or repetition of structured fields.

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 simple mutation tool with two optional parameters and no output schema, the description covers everything an agent needs to call it correctly: what it does, when to use it, what to avoid, prerequisites, side effects, and return. The sibling tool list provides further disambiguation, and the description resolves the most likely confusion points directly.

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?

The input schema already documents both parameters with 100% coverage, so the baseline is 3. The description adds value by explaining the default active-document behavior not fully in the schema, and by connecting save=true to the side effect of writing unsaved changes. It clarifies the document_id parameter's role in closing a specific open file, complementing the schema's activation detail.

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: 'Close a Photoshop document tab.' It clarifies the default target (active document) and the optional document_id override, and explicitly distinguishes itself from photoshop_set_active_document. An agent can confidently tell this apart from the closely related save and tab-switching tools.

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 provides explicit 'Use when' and 'Do NOT use when' guidance, including the exact alternative (photoshop_set_active_document) for the non-closing case. It also gives a practical cleanup scenario after photoshop_list_documents. This leaves no ambiguity about when to invoke the tool.

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