Skip to main content
Glama

photoshop_set_active_document

Switch the active document in Photoshop to target subsequent operations. Provide a document ID, zero-based index, or name to select among multiple open files.

Instructions

Switch the active document tab by document_id (preferred), zero-based index, or name.

Use when: working across multiple open files and mutations must target a specific document. Do NOT use when: only one document is open — it is already active. Do NOT use document_name when duplicate names exist — use document_id from photoshop_list_documents.

Returns: JSON { ok, summary, details: { activated: { id, name }, context } }. Preconditions: target document must be open. Provide exactly one of document_id, index, or document_name. Side effects: changes active tab.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNoZero-based tab order index (leftmost tab is 0)
document_idNoUnique internal document id from photoshop_list_documents (preferred)
document_nameNoDocument name/title (ambiguous if multiple tabs share the same name)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and largely succeeds: it discloses side effects ('changes active tab'), preconditions ('target document must be open'), and the exact return shape. It does not discuss error behavior for invalid or missing identifiers, but the core behavioral traits are clearly stated.

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 compact and well-structured, with the primary action front-loaded and use conditions, returns, preconditions, and side effects each earning their place. There is no redundant filler.

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?

Despite having no output schema, the description documents the return JSON shape, the precondition that the document must be open, the ambiguity caveat for duplicate names, and the side effect of changing the active tab. This is fully sufficient for an agent to select and invoke the tool 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 100%, so the baseline is 3. The description adds value beyond the schema by emphasizing that document_id is preferred, warning against document_name when duplicates exist, and requiring exactly one of the three parameters even though the schema marks none as required.

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 states a specific verb and resource: 'Switch the active document tab' by document_id, index, or name. It clearly distinguishes this tool from siblings like photoshop_list_documents and photoshop_get_document_info by focusing on changing the active tab rather than inspecting or creating documents.

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?

Explicit 'Use when' and 'Do NOT use when' conditions are provided, including the case of a single open document and duplicate document names. It also names the recommended source for document_id (photoshop_list_documents), giving clear routing guidance.

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