Skip to main content
Glama

Attach Image To Page

media_attach
Idempotent

Attach a ready media asset to the page. placement determines where: avatar (header), block_image (image inside a specific block — requires blockId), gallery_item (appended to a gallery — optional blockId targets a specific gallery; otherwise the first one is used), background (theme background).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesThe pageId returned by page_create.
altTextNoMeaningful alt text for the image.
blockIdNoRequired when placement is block_image; optional for gallery_item (targets a specific gallery block).
editTokenNoRequired for anonymous demo pages. Use the editToken returned by page_create.
placementYesWhere the image should be used. header_photo = business-card top photo, avatar = profile header avatar, block_image = image inside a block (requires blockId), gallery_item = appended to a gallery block, background = page background.
mediaAssetIdYesThe mediaAssetId returned by media_upload or media_upload_link_create.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
urlNo
pageIdNo
statusYes
altTextYes
contentNo
attachedNo
nextStepNo
variantsNo
deletedAtNo
expiresAtNo
placementYes
revisionIdNo
uploadedAtNo
mediaAssetIdYes
uploadPageUrlNo
revisionVersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare the mutation profile (readOnlyHint=false, idempotentHint=true, destructiveHint=false), so safety is covered structurally. The description adds placement-effect context (avatar goes to header, gallery_item is appended, background is theme background), but says nothing about permissions, what happens to a previously attached asset at the same placement, or the editToken/auth requirement for anonymous pages.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single dense sentence, front-loaded with the core action before the placement enumeration. The inline parentheticals carry real information rather than filler, though the run-on structure makes it slightly harder to scan than a short bulleted mapping would be.

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

Completeness4/5

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

With annotations, a full output schema, and 100% schema coverage, the description only needs to add placement routing and it does so competently. The omission of header_photo and unassigned from the placement list and the absence of the prerequisite narrative are minor relative to the structured fields that cover them.

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 description restates placement semantics already documented in the schema and, notably, enumerates only four of the six enum values (omitting header_photo and unassigned), so it neither compensates for nor extends the schema meaningfully.

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?

States a specific verb ('Attach') and resource ('a ready media asset to the page'), and the word 'ready' implicitly separates it from the upload siblings. The placement breakdown gives the agent an immediate sense of what the operation does to the page.

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

Usage Guidelines3/5

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

Explains the conditional routing for placement (block_image requires blockId, gallery_item optional blockId, otherwise first gallery used), which is genuinely useful usage context. However, it never states when to use this tool versus media_upload or media_upload_link_create, nor that a media asset must already exist, so the agent must infer prerequisites from the schema descriptions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources