Skip to main content
Glama

photoshop_get_state

Read a cheap, read-only snapshot of the current Photoshop session to get the active document, layer, and selection. Use it before edits or after errors to recover context safely.

Instructions

Return a cheap read-only snapshot of Photoshop session state (active document, layer, selection).

Use when: before any tool that needs an active document/layer, or after an error to recover context. Do NOT use when: you only need a visual preview — use photoshop_get_preview instead.

Returns: JSON with hasDocument, openDocumentCount, document.id/name/dimensions/colorMode/artboards, activeLayer, activeArtboard, hasSelection. Capture document.id and pass it as document_id on later mutating calls. Artboard ids come from document.artboards[].id. When openDocumentCount > 1, call photoshop_list_documents before acting across tabs. Preconditions: none (safe on empty session). Side effects: none.

Input Schema

NameRequiredDescriptionDefault
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?

Even with no annotations, the description states it is read-only, has no side effects, is safe on an empty session, and notes when openDocumentCount > 1 the caller should call photoshop_list_documents. It also discloses the return shape, which is critical because there is no output schema.

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 organized into scannable sections (use/when-not/returns/preconditions) with zero filler. Each sentence carries operational information, and the most important identifier ('read-only snapshot') is front-loaded.

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 read-only state tool with no output schema, this description fully covers return fields, preconditions, side effects, and multi-document handling. Nothing an agent needs to call it correctly or interpret its result 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?

The input schema already fully documents document_id, so the baseline is 3; the description adds value by telling the agent to capture document.id and pass it as document_id on later mutating calls, and to reference artboard ids from document.artboards[].id.

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?

Description opens with a specific verb and resource: 'Return a cheap read-only snapshot of Photoshop session state (active document, layer, selection).' It enumerates included fields and explicitly contrasts with photoshop_get_preview, making it distinguishable from siblings without needing to inspect schemas.

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?

Contains explicit 'Use when' and 'Do NOT use when' sections, names photoshop_get_preview as the alternative for visual previews, and gives a concrete recovery scenario (after an error). This fully routes selection among similar tools.

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