Skip to main content
Glama

Get a media item

get_media
Read-only

Retrieve a specific media item by ID from a WordPress site, including source URL, dimensions, generated sizes, alt text, and attachment details.

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.
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering the safety profile. The description adds context about returned fields (source URL, dimensions, etc.) but no behavioral traits like error handling or not-found behavior. With annotations handling the main behavioral expectations, the description adds minimal extra value, warranting a baseline score of 3.

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, efficient sentence that front-loads the core action ('Fetch one media item by ID') and then lists the relevant payload fields. There is zero waste; every word adds informational value.

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 read-only retrieval tool with only two parameters and no output schema, the description's enumeration of returned fields gives the agent a clear expectation. It omits possible edge-case behavior (e.g., 404 when the ID doesn't exist), but that is a minor gap for such a straightforward tool. The tool is well-specified for its complexity.

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 both parameters (id, site_id) are adequately documented in the schema. The description only mentions 'by ID', which aligns with the id parameter but adds nothing beyond what the schema provides. Per the guidelines, baseline 3 is appropriate when the schema already explains parameters.

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 uses a specific verb 'Fetch' plus resource 'media item' and the selection criterion 'by ID', and enumerates the fields returned. It clearly distinguishes from sibling tools like list_media (plural) and update_media (modifying), leaving no ambiguity about its scope.

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 context is unambiguous: this is the tool to retrieve a single media item by ID. However, it does not explicitly state when not to use it or mention alternatives such as list_media for multiple items, though the name and singular phrasing imply the distinction. No explicit exclusions or alternatives are given, so it earns a 4, not a 5.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alokemajumder/wpxmcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server