Skip to main content
Glama

Attach media to a Postlyra draft

attach_media_to_draft

Use this when adding images without changing draft text. Pass mediaFile1..mediaFile6 or mediaFiles: six total, JPEG/PNG/GIF/WebP, 10 MiB each. Exact placement uses update_post_draft with richDocument slot bindings. Returns JPEG and enables a public preview link. Display the image in the FINAL answer via native attachment or display.imageMarkdown. On error follow nextAction. May fetch external image URLs during import or screenshot rendering. Never publishes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
draftIdYes
mediaFile1NoActual attached or generated image file, up to 10 MiB: JPEG, PNG, GIF or WebP. Pass the file through the client upload mechanism; the server receives download_url and file_id. mime_type and file_name may be omitted. In the same richDocument call, use this slot name as media.src for exact placement.
mediaFile2NoActual attached or generated image file, up to 10 MiB: JPEG, PNG, GIF or WebP. Pass the file through the client upload mechanism; the server receives download_url and file_id. mime_type and file_name may be omitted. In the same richDocument call, use this slot name as media.src for exact placement.
mediaFile3NoActual attached or generated image file, up to 10 MiB: JPEG, PNG, GIF or WebP. Pass the file through the client upload mechanism; the server receives download_url and file_id. mime_type and file_name may be omitted. In the same richDocument call, use this slot name as media.src for exact placement.
mediaFile4NoActual attached or generated image file, up to 10 MiB: JPEG, PNG, GIF or WebP. Pass the file through the client upload mechanism; the server receives download_url and file_id. mime_type and file_name may be omitted. In the same richDocument call, use this slot name as media.src for exact placement.
mediaFile5NoActual attached or generated image file, up to 10 MiB: JPEG, PNG, GIF or WebP. Pass the file through the client upload mechanism; the server receives download_url and file_id. mime_type and file_name may be omitted. In the same richDocument call, use this slot name as media.src for exact placement.
mediaFile6NoActual attached or generated image file, up to 10 MiB: JPEG, PNG, GIF or WebP. Pass the file through the client upload mechanism; the server receives download_url and file_id. mime_type and file_name may be omitted. In the same richDocument call, use this slot name as media.src for exact placement.
mediaFilesNoAlternative file array for clients supporting file arrays. Prefer mediaFile1..mediaFile6 otherwise. At most 6 files total across slots and array; use mediaFiles[0] etc. as richDocument src bindings.
referencesNo
placementHintNoLegacy advisory field; placement is automatic (after heading, then near opening body). For exact placement use update_post_draft with richDocument and file-slot src bindings.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo
textNo
titleNo
localeNo
statusNo
displayNo
draftIdYes
messageYes
richHtmlNo
updatedAtNo
previewUrlNo
screenshotNo
documentJsonNo
inlineButtonsNo
screenshotUrlNoJPEG screenshot of the saved Telegram preview; null if rendering is temporarily unavailable.
mediaAttachmentsAddedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (which already flag non-readonly, non-destructive, open-world), the description discloses real side effects: it enables a public preview link, may fetch external image URLs during import/rendering, and 'Never publishes'. That is meaningful context for a mutation tool, though the stray 'Returns JPEG' is cryptic.

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?

The guidance is front-loaded with the use case, then constraints, then follow-up behavior, with almost no filler. It is dense but each clause carries operational information; only the ambiguous 'Returns JPEG' fragment reads as waste.

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?

For a 10-parameter mutation tool with annotations and an output schema, the description covers selection, limits, formats, placement routing, and side effects adequately. The unexplained references/placementHint params and the unclear return mention are the only material gaps.

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?

Schema coverage is high (80%), so baseline is 3, and the description still adds value: it explains the slot-vs-array choice, the six-file total cap across both, accepted formats and the 10 MiB limit, and that slot names become richDocument src bindings. It omits mention of the references and placementHint parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening clause states a specific verb+resource ('adding images' to a draft) and explicitly carves out the boundary with update_post_draft for exact placement. However, it never differentiates from the sibling tool attach_media, which an agent would plausibly consider for the same task.

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

Usage Guidelines4/5

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

'Use this when adding images without changing draft text' gives a clear selection condition, and 'Exact placement uses update_post_draft with richDocument slot bindings' names an alternative and when to prefer it. It stops short of a full when/when-not matrix (attach_media and create_media_upload are never referenced).

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.