Skip to main content
Glama

Find (and optionally update) content by URL

find_content_by_url

Given a WordPress URL, find the content behind it by detecting the post type from the URL shape, and optionally update that content in the same call.

Instructions

Resolve any WordPress front-end URL to the content behind it, detecting the post type from the URL shape (so /documentation/getting-started/ finds the documentation custom post type), then optionally update it in the same call. This is the tool to reach for when a human hands you a link. Detection tries, in order: an explicit ?p= id, the site's own search index, the registered rewrite base, then a slug sweep across every type.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAny URL on the site — permalink, ?p=123, or a pretty CPT URL.
dateNoPublish date in site time, ISO 8601 (2026-01-31T09:00:00). With status "future" this schedules the post.
metaNoCustom fields, as key/value pairs. A key only writes if it is registered with show_in_rest — use set_content_meta for unregistered keys.
slugNoURL slug. Changing this on published content breaks existing links unless you add a redirect.
editsNoTargeted find/replace edits applied to the existing content, so you can change one paragraph without resending the whole document. Edits apply in order. Mutually exclusive with `content`.
termsNoTaxonomy assignments keyed by taxonomy REST base, e.g. {"categories": [3], "tags": ["news"]}. Names that do not exist yet are created.
titleNoThe title, as plain text.
authorNoUser ID of the author.
formatNoPost format: standard, aside, gallery, link, image, quote, status, video, audio, chat.
parentNoParent ID, for hierarchical types such as pages.
statusNopublish | future | draft | pending | private | trash.
stickyNoPin the post to the top of the blog. Posts only.
updateNoApply the supplied changes once the content is found. Off by default, so this tool is safe to use purely for lookup.
contentNoFull content body, replacing whatever is there. For the block editor this is block markup (<!-- wp:paragraph --><p>…</p><!-- /wp:paragraph -->); classic content is plain HTML. Use `edits` instead for a small change.
excerptNoHand-written excerpt.
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.
passwordNoPassword-protect the content.
templateNoPage template file, e.g. "templates/full-width.php".
menu_orderNoSort order for hierarchical types.
ping_statusNoWhether pingbacks and trackbacks are accepted.
comment_statusNoWhether comments are open on this item.
featured_mediaNoAttachment ID of the featured image. Upload it with create_media first.
include_contentNoReturn the full body along with the match.
Behavior4/5

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

Annotations already declare readOnlyHint=false, so the description correctly implies it can mutate via 'optionally update'. It adds useful behavioral details beyond annotations: the detection order (explicit ?p= id, search index, rewrite base, slug sweep) and the safe lookup mode when update=false (though this is described in the parameter, not the tool description). The description doesn't contradict annotations and provides meaningful context.

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 2-3 sentences, each serving a distinct purpose: (1) core functionality with example, (2) primary use case, (3) internal detection logic. It is front-loaded with the main purpose and contains no fluff. Every sentence earns its place.

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?

Given the high complexity (23 parameters, nested objects), the description covers the core workflow well: URL resolution and optional update. It doesn't explicitly mention limitations (e.g., it only works on existing content, not creation), but the schema and annotations cover the broad scope. The description is sufficiently complete for an agent to start using 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 coverage is 100%, so the baseline for this dimension is 3. The description adds context for the 'url' parameter (how detection works) but does not explain other parameters; they are fully described in the schema itself. The added URL resolution detail is useful but not extensive enough to raise the score above baseline.

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 states a specific verb ('Resolve') and resource ('any WordPress front-end URL to the content behind it'), and explains the URL shape detection mechanism with an example (/documentation/getting-started/ -> documentation CPT). It clearly distinguishes from siblings like get_content_by_slug or get_content, since it handles URLs directly and can also update.

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?

It explicitly states the primary use case: 'This is the tool to reach for when a human hands you a link.' This gives clear when-to-use context. It doesn't explicitly name alternatives or exclusions (e.g., for known IDs/slugs use other tools), but the description implies it is the go-to for URL→content resolution. Minor gap: no explicit 'when not to use'.

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