Skip to main content
Glama

delivery_get_by_slug

Read-only

Read a published content item by its URL slug, returning it as the public Delivery API serves it with computed urlPath and SEO metadata, or null when nothing matches.

Instructions

Read one content item by its slug (the last URL segment). Slugs are unique only among siblings, so prefer delivery_get_by_path for a page's full URL. Returns the item as the public Delivery API serves it — published only (unless preview), private fields removed, plus computed urlPath, fieldTypes and SEO metadata on pages — or null when nothing matches. Use get_content to read a draft for editing.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteNoSite slug or id to act in (multisite). Omit to use this server's default site. Call list_sites to see what exists — an empty tree or search usually means the wrong site, not missing content.
slugYesThe slug, without slashes, e.g. 'about-us'.
localeNoLocale code. Omit for the document's own locale (its site-default variant, else its only variant).
previewNotrue = read the latest drafts as the preview pane shows them (needs site-wide read access). Default false: published content only, exactly what visitors get.
populateNoHow many levels of references and shared blocks to resolve inline, 0-4 (default 0: references stay as ids).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • addedInput schema / properties / populate / description
      Added value: +"How many levels of references and shared blocks to resolve inline, 0-4 (default 0: references stay as ids)."
    • changedInput schema / properties / preview / description
      Previous value: -"Use the preview perspective (drafts)"New value: +"true = read the latest drafts as the preview pane shows them (needs site-wide read access). Default false: published content only, exactly what visitors get."
    • addedInput schema / properties / slug / description
      Added value: +"The slug, without slashes, e.g. 'about-us'."
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

With readOnlyHint already covering safety, the description adds substantial context beyond annotations: published-only unless preview, private fields removed, the computed urlPath/fieldTypes/SEO fields on pages, and the null return when nothing matches. This is exactly the return-shape and filtering disclosure that a read operation needs.

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?

Four dense sentences, zero filler. The core 'read by slug' scope is front-loaded, followed by disambiguation, then return behavior. Every clause carries information.

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

Completeness5/5

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

No output schema exists, but the description fully covers the return contract (published-only filtering, computed fields, null on miss) and prerequisites (preview needs site-wide read). Nothing an agent needs to call this correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all five parameters and the baseline is 3. The description adds real semantic value on top: slug uniqueness only among siblings, and preview semantics tying to the draft/live distinction, which informs how the parameter should be set.

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?

States a specific verb and resource ('Read one content item by its slug') with a precise scope clause (slug = last URL segment). It proactively distinguishes itself from siblings delivery_get_by_path and get_content, so an agent can select it without opening other schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit routing advice: 'prefer delivery_get_by_path for a page's full URL' and 'Use get_content to read a draft for editing.' Both the preferred alternative and the when-not condition are named, leaving nothing to inference.

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