Skip to main content
Glama

AI Engine for WordPress

Count media

wp_count_media
Read-only

Count the items in the Media Library, optionally within a date range.

Input Schema

NameRequiredDescriptionDefault
afterNo
beforeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safe read-only profile is covered. The description adds the date-scoping context but says nothing about permissions required or the shape of the count result, which is the main remaining gap for a counting tool.

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 well-formed sentence with zero padding and the key scope ('Media Library') front-loaded. Its brevity edges toward under-specification, but nothing in it is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple two-parameter read-only counter with no output schema, the description covers the core purpose but leaves the date parameter format and the returned count structure unexplained. Adequate but with clear gaps an agent would have to probe for.

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 0%, so the description carries the burden for 'after' and 'before'; it does clarify that they form an optional date range, which is real added meaning. However, it omits the expected format (ISO 8601? relative?) and whether bounds are inclusive, leaving the agent to guess.

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?

The description gives a specific verb and resource: 'Count the items in the Media Library', which clearly distinguishes it from wp_count_posts and wp_count_terms by resource. It doesn't explicitly name those siblings, but the resource noun is unambiguous enough that an agent can select it correctly.

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?

The phrase 'optionally within a date range' implies when the parameters are relevant, but there is no explicit routing guidance such as 'use wp_get_media to retrieve the actual items' or any prerequisite/exclusion. Usage is implied rather than stated.

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.

Resources