Skip to main content
Glama

Save entry content

save_entry_content
Destructive

Save/update the content of a collection entry.

Merge semantics (RFC 7396 JSON Merge Patch):

  • Fields you send override the server's values.

  • Fields you omit are preserved from the existing entry.

  • To explicitly clear a field, send it as null.

  • Arrays are REPLACED wholesale: send the full array you want.

Content is a JSON object where keys MATCH the collection's field schema (call get_collection first to see exact field names and types).

Value shape by field type:

  • text: string

  • html: string (HTML)

  • number: number

  • checkbox (and the older boolean): true or false

  • date: a calendar date "YYYY-MM-DD" (e.g. "2026-09-09") when the field's config.time is false or absent; an ISO timestamp with a numeric UTC offset such as "2026-09-09T14:30:00-07:00" (never a Z suffix) when config.time is true. Check the field's config in get_collection. Anything else is refused.

  • image / media: object { src: string, alt?: string } or a URL string

  • icon: a library icon path such as "regular/rocket.svg" (styles regular, thin, light, bold, fill, duotone; every style but regular repeats itself in the file name, e.g. "duotone/rocket-duotone.svg"), or the https URL of an SVG or PNG uploaded to the project. To show it on a section bound to the collection, map the item's first icon slot with three keys: "icons[0].pqIcon": "<%=_icon.FIELD.pqIcon%>", "icons[0].src": "<%=_icon.FIELD.src%>", "icons[0].svgStr": "" (FIELD is the icon field's name). Library icons then take the template card's icon color; uploaded files draw as uploaded.

  • reference: string (target entry ID; must point at an existing entry)

  • related: string (the ID of another entry in the same collection); an array of IDs when list: true

LIST fields: when a field has list: true in the schema (check get_collection), send an ARRAY of the base type instead, e.g. a list reference takes ["entryId1", "entryId2"], a single-ID string is INVALID and will be rejected. Arrays are replaced wholesale on merge.

The built-in name and slug fields (type name and type slug in the schema) are NOT content: keys for them are refused. Rename an entry or change its address with update_entry.

Example: to update only the body, send { body: "New content" }. Name, slug, and other fields are preserved automatically.

You MUST provide lastVersion from get_entry latestRevision.version for optimistic concurrency.

Input Schema

NameRequiredDescriptionDefault
contentYesEntry content patch. Send only the fields you want to change; omitted fields are preserved from the existing entry. Send null to clear a field. Call get_collection to see the field schema.
entryIdYesThe entry ID
projectIdYesThe project ID
lastVersionYesThe current revision version (from get_entry latestRevision.version). Required for conflict detection.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

With destructiveHint=true already present, the description adds substantial behavioral context: omitted fields are preserved, null clears a field, arrays are replaced wholesale, reference IDs must exist, list fields must be arrays, and invalid date formats are refused. It also explains optimistic concurrency via lastVersion, which no annotation conveys.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with merge semantics before the exhaustive field-type rules, and the bullets make the density navigable. The icon mapping block is long and niche, but it is tied to a genuinely complex content type rather than being filler.

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?

Covers prerequisites, merge behavior, and content value shapes thoroughly for a nested, polymorphic mutation tool with no output schema. It stops short of saying what the call returns and what specifically happens on a lastVersion conflict, which an agent would benefit from knowing.

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

Parameters5/5

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

Schema coverage is already 100%, but the description goes well beyond it by giving per-field-type value shapes (text, html, number, checkbox/boolean, date and its config.time-dependent format, image/media, icon, reference, related) and list-field semantics. lastVersion also gets runtime meaning ('from get_entry latestRevision.version').

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 ('Save/update the content of a collection entry') and immediately distinguishes itself from update_entry by declaring that name/slug keys are refused and must be changed via update_entry. An agent can separate this from save_page_content or save_section_content on resource alone.

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?

Explicitly directs the agent to call get_collection before composing content and get_entry for lastVersion, and routes rename/address changes to update_entry. The merge-only nature of the call is stated up front, so when to use and when not to use it are both inferable without opening a schema.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.