Skip to main content
Glama

delivery_get_by_id

Read-only

Fetch one published content item by documentId exactly as the public Delivery API serves it, including urlPath and SEO metadata, or null if no match.

Instructions

Read one content item by documentId exactly as the website receives it. 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.
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).
documentIdYesThe item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.3
    • changedInput schema / properties / documentId / description
      Previous value: -"Content documentId"New value: +"The item's documentId (stable across locales and versions), e.g. from tree, list_pages or get_content."
    • 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."
  2. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, but the description adds real behavioral context: published-only unless preview, private fields removed, computed urlPath/fieldTypes/SEO metadata, and null on no match. That is well beyond what the annotations provide.

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?

Three tight sentences: identity and semantics first, return shape second, sibling routing last. No filler, and the most decision-relevant clause is front-loaded.

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?

With no output schema, the description carries the return-value burden and does it: it enumerates the computed fields and the null-on-miss case. Combined with annotations and full param coverage, an agent has everything needed to call 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 description coverage is 100%, so preview, site, locale, populate and documentId are all documented at the source; baseline 3 applies. The description retouches preview ('unless preview') but adds no syntax or format detail beyond the schema.

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 documentId') and pins down the exact semantics ('exactly as the website receives it', 'as the public Delivery API serves it'). This distinguishes it from get_content and the other delivery_* readers without requiring the agent to open a schema.

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?

Explicitly names an alternative and the condition that selects it: 'Use get_content to read a draft for editing.' That is clear routing guidance. It does not differentiate from the closely-named siblings delivery_get_by_slug / delivery_get_by_path, leaving a small gap for a sibling set this crowded.

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