Skip to main content
Glama

get_media

Retrieve details for a WordPress media attachment by ID, including URL, dimensions, and alt text, to inspect or reuse the file in site content.

Instructions

Get details of a single media attachment by ID (URL, dimensions, alt text, etc.)

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>"
    },
    "name": "get_media"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesMedia attachment ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are supplied, so the description must carry the behavioral burden. It signals a read-only retrieval and previews the returned fields (URL, dimensions, alt text), but says nothing about behavior when the ID does not exist, permission requirements, or error responses — a meaningful gap for a tool with zero annotation coverage.

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 tight sentence with the key action front-loaded, and the parenthetical example fields add useful detail without bloat. Nothing superfluous is present.

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 simple single-parameter read tool, the description supplies what the schema and absent output schema leave unstated — the kinds of fields returned. Only missing piece is failure/error semantics, which keeps it from a 5.

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?

Only one parameter exists and schema description coverage is 100%, so the schema already documents 'Media attachment ID'. The description confirms the ID refers to a single media attachment but adds no format or lookup semantics beyond that, making the baseline 3 appropriate.

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?

States a specific verb and resource ('Get details of a single media attachment') and scopes it to one item by ID, which implicitly contrasts with the sibling list_media. It stops short of naming an explicit alternative, so it is clear but not maximally differentiated.

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?

Usage is implied: fetch metadata for a media attachment whose ID you already know. There is no explicit when-to-use/when-not-to-use statement and no routing to siblings such as list_media for discovery, which is the main gap.

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