Skip to main content
Glama

photoshop_fit_layer_to_document

Scale the active layer to fit the document canvas while preserving aspect ratio. Choose to fill the entire canvas or fit within it, preventing distortion.

Instructions

Scale the active layer to fit the document canvas while maintaining aspect ratio

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.
fillDocumentNoIf true, fills entire canvas (may crop). If false, fits within canvas (may have margins). Default: false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the core scaling behavior and aspect ratio preservation, but omits important details such as the mutating/destructive nature of scaling, effects on layer contents, potential cropping implications, or whether the operation is reversible via undo.

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 a single, focused sentence that front-loads the primary action and constraint. Every word contributes to understanding the tool's purpose, with no redundant or marketing language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given that this is a mutating operation with no annotations and no output schema, the description is incomplete for an AI agent. It lacks guidance on when to choose this tool versus related scaling tools, does not disclose side effects or safety considerations, and does not explain what happens when no valid layer is active or when a document is not specified.

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

Parameters3/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 tool description itself adds no parameter-specific meaning, but the schema already documents document_id activation behavior and the fillDocument fit-vs-fill distinction clearly.

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 operation: scale the active layer to fit the document canvas while maintaining aspect ratio. This clearly distinguishes the tool from generic layer scaling tools like photoshop_scale_layer by specifying the fit-to-canvas behavior, and from image-level operations like photoshop_resize_image.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to prefer this tool over alternatives such as photoshop_scale_layer or canvas resizing. It also does not mention prerequisites like having an active layer selected or how document_id activation should influence usage.

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