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_idNoPass 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.

Output Schema

NameRequiredDescriptionDefault
_mcp_instructionsNoServer-issued metadata for this conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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: +[]
  2. Changed1 schema field changed
    • changedInput schema / required
      Previous value: -[
      -  "post_id",
      -  "media_urls",
      -  "context",
      -  "llm_model"
      -]New value: +[
      +  "post_id",
      +  "media_urls"
      +]
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the annotations (destructiveHint=true, openWorldHint=false) by disclosing that the call replaces the entire media list, that empty list clears it, that PDFs only render on LinkedIn document posts, and that a post missing required media still saves but returns a publishBlocker. Also states the batch cap of 25 posts for `updates`.

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 single-sentence purpose, then behavioral notes, then an Args block. Every sentence carries information; the line-wrapped prose is slightly dense but not padded.

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 7-parameter destructive mutation with an output schema, the description covers replacement semantics, clearing, batch behavior, and the publishBlocker outcome. Return-value detail is rightly left to the output schema, though the interaction between post_id and updates (mutually exclusive vs. combined) could be stated.

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 only 43%, so the description compensates by explaining media_urls origin (list_media or workspace storage), the updates payload shape ({post_id, media_urls | media_ids}), and workspace_id optionality. It leaves context/llm_model/conversation_id to the schema, which already documents them.

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?

Opens with a specific verb+resource and scope: "Set the exact media list on a post: reorder, remove or clear." It explicitly distinguishes itself from the sibling add_media ("Appending is `add_media`"), so an agent can pick correctly without opening schemas.

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?

Names the alternative (add_media) and the condition that selects it, and explains that an empty list clears media. Missing an explicit warning about when NOT to overwrite (e.g. use add_media if you only want to append and preserve existing order), but the routing is clear.

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.