Skip to main content
Glama

Get a media item

get_media
Read-only

Fetch a media item by ID to retrieve its source URL, dimensions, generated sizes, alt text, and attachment location. Provides complete metadata for the specified attachment.

Instructions

Fetch one media item by ID, including its source URL, dimensions, generated sizes, alt text and where it is attached.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe attachment ID.
site_idNoWhich configured WordPress site to act on. Optional — with a single site configured it is used automatically; with several, the default site is used unless you name one. Run list_sites for valid ids.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / id / maximum
      Added value: +9007199254740991
    • addedInput schema / properties / id / minimum
      Added value: +-9007199254740991
  2. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, which covers the safety profile. The description adds meaningful behavioral context beyond annotations by specifying what the fetch returns: source URL, dimensions, generated sizes, alt text, and attachment locations. No contradictions or hidden side effects are suggested.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence with the core action front-loaded ('Fetch one media item by ID') and the return details appended. Every phrase earns its place; there is no fluff, redundancy, or unnecessary context.

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 simple read-only fetch tool, the description is complete: the required parameter is obvious, the schema covers the optional site_id, annotations cover safety, and the description enumerates the expected return fields despite the lack of an output schema. An agent has everything needed to invoke it correctly.

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?

Schema description coverage is 100%, so the schema fully documents the `id` and `site_id` parameters. The description does not add parameter-level semantics beyond the schema, but this is acceptable because the schema already carries the burden. Baseline 3 is appropriate.

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 description says exactly what it does: 'Fetch one media item by ID.' It names the resource, the operation, and the key discriminator (by ID), which distinguishes it from list_media and the media mutation siblings. The list of returned fields adds further precision without obscuring the core purpose.

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?

The description clearly implies the right context: use this when you have a specific media ID and want a single media entity. It does not explicitly name alternatives like list_media or state when not to use it, but the singular 'one media item by ID' provides clear enough guidance for an agent to route correctly.

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

Deploy Server

Other Tools