Skip to main content
Glama

Postlyra.app — Telegram posts from AI chats

Attach media to a Postlyra draft

attach_media_to_draft

Use this when adding images without replacing draft text: mediaFile1..6/mediaFiles or direct image references[].url, six total, JPEG/PNG/GIF/WebP, 10 MiB each. Inputs are downloaded, validated and imported before success; failure attaches nothing. For exact placement use update_post_draft with richDocument file-slot bindings. Returns JPEG/public preview; follow display instructions, validation and error nextAction. 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
cardNoInteractive card attachment and fallback instructions. attachedToThisResult means this response already supplies the card; do not automatically call show_post_card again. Host support determines actual rendering.
textNo
titleNo
localeNo
postIdNo
statusNo
displayNo
draftIdYes
messageYes
revisionNo
richHtmlNo
channelIdNo
updatedAtNo
previewUrlNo
screenshotNo
mediaStatusNoPresent only when image inputs were validated and imported into durable storage during this call. It does not describe arbitrary external document media.
documentJsonNo
inlineButtonsNo
screenshotUrlNoJPEG screenshot of the saved Telegram preview; null if rendering is temporarily unavailable.
signatureSnapshotNo
signatureSelectionNo
deliveryDocumentJsonNoComposed publication including the selected auto-signature. Edit documentJson, never copy this composition into the post body.
deliveryInlineButtonsNo
formattingSuggestionsNoOptional formatting ideas. They do not affect validation, publication or user consent. The user's choice always takes priority.
mediaAttachmentsAddedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / card / description
      Previous value: -"Interactive card availability and fallback instructions. Host UI support determines whether a card can render; preview links remain available."New value: +"Interactive card attachment and fallback instructions. attachedToThisResult means this response already supplies the card; do not automatically call show_post_card again. Host support determines actual rendering."
  2. Changed1 schema field changed
    • addedOutput schema / properties / formattingSuggestions
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Optional formatting ideas. They do not affect validation, publication or user consent. The user's choice always takes priority.",
      +  "properties": {
      +    "advisory": {
      +      "const": true,
      +      "type": "boolean"
      +    },
      +    "decisionOwner": {
      +      "const": "user",
      +      "type": "string"
      +    },
      +    "instruction": {
      +      "type": "string"
      +    },
      +    "items": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "blockPaths": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "maxItems": 5,
      +            "type": "array"
      +          },
      +          "code": {
      +            "type": "string"
      +          },
      +          "message": {
      +            "type": "string"
      +          },
      +          "recommendation": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "message",
      +          "recommendation",
      +          "blockPaths"
      +        ],
      +        "type": "object"
      +      },
      +      "maxItems": 4,
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "advisory",
      +    "decisionOwner",
      +    "instruction",
      +    "items"
      +  ],
      +  "type": "object"
      +}
  3. Changed6 schema fields changed
    • addedInput schema / properties / references / items / properties / mimeType
      Added value: +{
      +  "description": "Optional image MIME metadata, for example image/png; downloaded bytes are always validated.",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • changedInput schema / properties / references / items / properties / url / description
      Previous value: -"Direct image URL to attach to the draft."New value: +"Direct image download URL, with or without an extension. The image is downloaded, validated and durably imported before attachment."
    • addedOutput schema / properties / card
      Added value: +{
      +  "description": "Interactive card availability and fallback instructions. Host UI support determines whether a card can render; preview links remain available.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / mediaStatus
      Added value: +{
      +  "description": "Present only when image inputs were validated and imported into durable storage during this call. It does not describe arbitrary external document media.",
      +  "enum": [
      +    "imported"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / postId
      Added value: +{
      +  "maxLength": 128,
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedOutput schema / properties / revision
      Added value: +{
      +  "minimum": 1,
      +  "type": "integer"
      +}
  4. Changed7 schema fields changed
    • addedOutput schema / properties / channelId
      Added value: +{
      +  "maxLength": 128,
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / deliveryDocumentJson
      Added value: +{
      +  "description": "Composed publication including the selected auto-signature. Edit documentJson, never copy this composition into the post body.",
      +  "type": "object"
      +}
    • addedOutput schema / properties / deliveryInlineButtons
      Added value: +{
      +  "items": {
      +    "anyOf": [
      +      {
      +        "type": "object"
      +      },
      +      {
      +        "items": {
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    ]
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / inlineButtons / items / anyOf
      Added value: +[
      +  {
      +    "type": "object"
      +  },
      +  {
      +    "items": {
      +      "type": "object"
      +    },
      +    "type": "array"
      +  }
      +]
    • removedOutput schema / properties / inlineButtons / items / type
      Removed value: -"object"
    • addedOutput schema / properties / signatureSelection
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "mode": {
      +      "enum": [
      +        "inherit",
      +        "none",
      +        "custom"
      +      ],
      +      "type": "string"
      +    },
      +    "signatureId": {
      +      "maxLength": 128,
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "mode"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / signatureSnapshot
      Added value: +{
      +  "type": [
      +    "object",
      +    "null"
      +  ]
      +}
  5. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare write/openWorld/non-idempotent/non-destructive, but the description adds real behavioral context beyond them: inputs are downloaded, validated and imported before success and "failure attaches nothing" (atomicity), and it "Never publishes." It also signals the return preview and that error nextAction should be followed.

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?

Front-loads the when-to-use condition before constraints and fallbacks, and every clause carries information. It is dense to the point of terseness in places ("Returns JPEG/public preview; follow display instructions"), which slightly obscures meaning but wastes little space.

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?

For a 10-parameter nested-object mutation with an output schema present, the description covers the critical gaps: atomicity, format/size limits, the alternative for exact placement, and the no-publish guarantee. Nothing an agent needs to call it correctly is missing.

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 80%, so the baseline is 3, but the description adds genuine meaning: the mediaFile1..6/mediaFiles equivalence, the six-file aggregate cap, format/size limits, and direct references[].url usage. It stops short of explaining placementHint's legacy status here, leaving some redundancy with the schema.

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), resource (media), and target (draft) plus the distinguishing scope: "adding images without replacing draft text." This clearly separates it from update_post_draft (text/placement) and the sibling attach_media, so an agent can route without opening a schema.

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?

Opens with an explicit when-to-use condition and names the alternative for a different intent ("For exact placement use update_post_draft with richDocument file-slot bindings"). Constraints (six total, JPEG/PNG/GIF/WebP, 10 MiB each) further bound correct invocation.

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.