Skip to main content
Glama

photoshop_get_state

Retrieve a read-only snapshot of the active Photoshop document, layer, and selection. Use before operations that require an active target or after an error to regain context.

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, document.id/name/dimensions/colorMode, activeLayer kind/name, hasSelection. Capture document.id and pass it as document_id on later mutating calls. Preconditions: none (safe on empty session). Side effects: none.

Input Schema

TableJSON 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 observedv0.1.0

TDQS

A5/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. It explicitly states 'read-only', 'cheap', 'Preconditions: none (safe on empty session)', and 'Side effects: none'. It also outlines what the return JSON contains. This is thorough behavioral disclosure.

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 tightly structured with short sections: purpose, use-when, do-not-use, returns, preconditions, side effects. Every sentence earns its place with no filler or repetition.

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?

The description is complete for the tool's complexity. It covers the return shape, the optional parameter semantics, preconditions, side effects, and routing to an alternative. Nothing an agent needs to invoke it correctly is missing, even without an output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but the description adds actionable semantics beyond the schema: 'Capture document.id and pass it as document_id on later mutating calls.' It explains why the parameter exists and how to use it, going beyond the schema text.

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: 'Return a cheap read-only snapshot of Photoshop session state (active document, layer, selection).' It clearly distinguishes the tool from siblings by scoping it to session state and explicitly excluding visual preview use cases.

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 'Use when' / 'Do NOT use when' structure gives explicit conditions and names a concrete alternative (photoshop_get_preview). This leaves no ambiguity about when to invoke this tool versus a sibling.

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