Count posts
wp_count_postsCount posts by status (published, draft, scheduled, pending, private, trash) for one post type. The default post type is post.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_type | No |
wp_count_postsCount posts by status (published, draft, scheduled, pending, private, trash) for one post type. The default post type is post.
| Name | Required | Description | Default |
|---|---|---|---|
| post_type | No |
Changes observed during successful MCP inspections.
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 safety profile is covered. The description adds useful context by listing the statuses counted and the default post type, but it does not describe the return shape or whether counts are affected by permissions.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences with no wasted wording. The key scoping constraint and default value are front-loaded and easy to scan.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only count tool whose annotations already cover safety, the description gives enough context to invoke it correctly: statuses counted, one post type, and the default. It could mention the return format, but no output schema is present and the omission is minor for this tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and post_type has no schema description, so the description carries the burden. It compensates well by explaining that the parameter scopes the count to one post type and defaults to 'post'; it does not enumerate valid post-type values, but that is a minor gap for a single open string parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource (count posts), enumerates the supported statuses, and scopes the operation to one post type. This clearly separates it from siblings like wp_get_posts and wp_count_media/terms.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied by the purpose: count posts grouped by status for a post type. However, the description does not explicitly say when to use this instead of wp_get_posts or the other count tools, nor does it state any prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Add one secure layer between your agents and this server.