Skip to main content
Glama

Find content by slug

get_content_by_slug
Read-only

Find content by URL slug across all WordPress post types or restrict to specific ones. Resolves the post type when you only know the URL tail.

Instructions

Look up content by slug across every content type at once, or within specific types. Use when you know the URL tail but not which post type owns it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYesThe slug, i.e. the last path segment of the URL.
typesNoRestrict to these content types. Defaults to every REST-exposed type.
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.
include_contentNoInclude full bodies in the results.
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the read-only safety profile is covered. The description adds behavioral context beyond that: it can search across all types at once and optionally restrict to specific types. It does not mention edge cases like not-found behavior, but for a read-only lookup the description meaningfully supplements the annotation.

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?

Two sentences with zero fluff. The action and scope are front-loaded, and the usage condition is stated immediately after. Every word adds value; no redundant information.

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?

The tool is moderately simple with 4 parameters, but there is no output schema. The description does not describe the return value (e.g., whether it returns a single object or an array, or what happens if no match). Given no output schema, the description should hint at the result shape. That gap prevents a higher score.

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 already documents every parameter, including the slug meaning and site_id defaults. The description adds no new parameter-specific detail beyond what the schema provides; the 'use when URL tail' line slightly reinforces slug semantics but does not elevate meaning. Baseline 3 applies.

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 clearly states the verb 'look up' and the resource 'content by slug', and explicitly distinguishes its cross-type behavior from type-specific lookups. The phrase 'across every content type at once, or within specific types' differentiates it from siblings like get_content, and the usage hint names the exact scenario (knowing URL tail but not post type).

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 gives an explicit condition for use: 'when you know the URL tail but not which post type owns it.' It implies when not to use (when the type is known), and the ability to restrict by types adds usage context. However, it does not explicitly name alternative tools or say when to avoid this tool, so it is strong but not fully exhaustive.

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