Skip to main content
Glama

attach_media

Destructive

Set the exact media list on a post: reorder, remove or clear.

Replaces the post's media with media_urls in that order; an empty list removes all of it. Appending is add_media. PDFs render only on LinkedIn (document posts). Leaving a post without media its platform requires still saves, with a publishBlocker in the result. updates sets up to 25 posts' lists in one call, each answered in posts.

Args: post_id: The post ID to set media on. media_urls: Media URLs from list_media (or this workspace's storage). workspace_id: Workspace ID or name. Optional if user has only one workspace. updates: Instead: [{post_id, media_urls | media_ids}], each that post's exact list.

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": "attach_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
contextNoThe user's underlying goal for this call, in one sentence without personal details. Used for product analytics only.
post_idNo
updatesNo
llm_modelNoThe model identifier of the calling assistant, or "unknown". Used for product analytics only.
media_urlsNo
workspace_idNo
conversation_idNoThe conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics.

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / conversation_id / description
      Previous value: -"Pass the exact conversation_id from the server's previous response, unchanged. The server provides it on the first call — never invent one, and do not issue parallel tool calls until you have it. Keep passing the same conversation_id for the rest of the conversation, including after later user messages or on a different task; do not reset it when the user starts a new request."New value: +"The conversation_id this server returned earlier in this conversation, unchanged, including after later user messages. Omit it if you have none. Recorded for the server developer's analytics."
  2. Changed9 schema fields changed
    • addedInput schema / properties / media_urls / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / media_urls / default
      Added value: +null
    • removedInput schema / properties / media_urls / items
      Removed value: -{
      -  "type": "string"
      -}
    • removedInput schema / properties / media_urls / type
      Removed value: -"array"
    • addedInput schema / properties / post_id / anyOf
      Added value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / post_id / default
      Added value: +null
    • removedInput schema / properties / post_id / type
      Removed value: -"string"
    • addedInput schema / properties / updates
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "additionalProperties": true,
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Updates"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "post_id",
      -  "media_urls"
      -]New value: +[]
  3. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "post_id",
      -  "media_urls",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "post_id",
      +  "media_urls"
      +]
  4. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, and the description justifies that by explaining the full replacement semantics — existing media is overwritten, not merged. It adds genuinely new behavioral facts: PDFs render only on LinkedIn, a post can be saved without platform-required media and returns a `publishBlocker`, and `updates` answers per-post in `posts`.

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-loaded with the core replace semantics, then edge cases, then an Args block — a clean structure with no filler. The line-broken prose is slightly harder to scan than a single tight paragraph, but every sentence carries distinct information.

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 destructive batch-capable mutation with an output schema, the description covers replacement behavior, batch shape, platform constraints, and partial-success signalling via `publishBlocker`. The one gap is that no parameters are required, yet the description never says what happens if both `post_id` and `updates` are omitted, nor how errors on one entry in a batch are reported.

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 43% and the description compensates by defining `post_id`, `media_urls` (source: list_media or workspace storage), `workspace_id` (optional with a single workspace), and the `updates` payload shape `[{post_id, media_urls | media_ids}]`. It even introduces `media_ids` as an alternative to `media_urls`, which the schema does not type explicitly. The analytics-only params (context, llm_model, conversation_id) are left to the schema, which is fine.

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 opening line gives a precise verb+resource+scope: 'Set the exact media list on a post: reorder, remove or clear.' It immediately names the sibling it is not ('Appending is `add_media`'), so an agent can separate replace-semantics from append-semantics without inspecting either 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?

Explicit routing: use this for replace/reorder/clear, use `add_media` for appending, use `updates` for batch across up to 25 posts. It also states an edge condition ('an empty list removes all of it'), which is exactly the kind of when-to-use signal an agent needs to pick the right call.

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.