Skip to main content
Glama

photoshop_set_active_document

Idempotent

Switch the active Photoshop document by ID, index, or name to ensure edits target the correct open file when working across multiple tabs.

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.9/5.0
Behavior5/5

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

While annotations cover idempotence and non-destructiveness, the description adds important behavior beyond structured fields: preconditions, the exactly-one-selector rule, side effects on the active tab, and a return JSON shape.

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 front-loaded and tightly organized with labeled sections for usage, exclusions, returns, preconditions, and side effects. Every line contributes actionable information.

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 output schema, the description still documents the return shape. It covers selection constraints, preconditions, and side effects, leaving no significant gap for correct invocation.

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 100%, so the baseline is 3. The description adds valuable constraints beyond the schema: document_id is preferred, duplicate names make document_name ambiguous, and exactly one selector must be provided.

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: switching the active document tab. It distinguishes the tool from siblings like photoshop_list_documents and photoshop_set_active_artboard by naming the exact target and the accepted selectors.

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?

It gives explicit when-to-use and when-not-to-use guidance, including the single-document case. It also names the correct sibling for resolving duplicate document names and tells the agent to prefer document_id.

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