photoshop_get_document_info
Reads active Photoshop document and active-layer metadata without switching tabs; optionally verifies a document ID matches the active tab before returning JSON state.
Instructions
Read the active Photoshop document and active-layer metadata through Photoshop/UXP without painting or switching tabs. Use this when an open document is required; photoshop_get_state also supports checking whether a document exists, while photoshop_list_documents lists all open tabs. Returns a text response headed "Document info:" containing the JSON state snapshot (hasDocument, document and activeLayer metadata). Requires a working Photoshop/UXP connection and an active document; no active document returns isError=true with "Error getting document info: No active document". Optional document_id verifies that the expected document is already active and fails closed on a mismatch; it never activates that document.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "photoshop_get_document_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | No | Optional Photoshop document id from photoshop_get_state / photoshop_list_documents. When set, the tool verifies that this document is already active and fails closed if another tab is active. It never switches the active Photoshop document automatically. |