Skip to main content
Glama

Update datafile

update_datafile
Destructive

Update a datafile. This is a partial update at the FIELD level: only the arguments you provide change. Provide json to replace the WHOLE document (its property order is preserved verbatim); omit it to change only metadata. To change PART of an existing document, prefer patch_datafile — it sends just the edit and cannot lose a concurrent write. Use this tool when you are replacing the whole document anyway; both preserve property order. Sending json here means get_datafile, change the object you got back, then send it all — pass expected_content_sha256 with that round trip so a change you did not see is reported instead of overwritten. Republish to push the change to the CDN.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonNoReplacement JSON object for this datafile. Omit to leave the content unchanged. Property order is preserved verbatim.
schema_idNoId of the schema this datafile's JSON is validated against. Omit to leave the current binding unchanged.
datafile_idYesThe datafile id to update.
descriptionNoWhat this datafile holds. Omit to leave unchanged.
display_nameNoHuman-readable name. Omit to leave unchanged.
use_latest_schemaNoValidate against the latest (draft) schema version instead of the published one. Only applied when schema_id is also provided.
expected_content_sha256NoThe content_sha256 from the get/create/update that gave you the content you edited. When set, the update is rejected (FAILED_PRECONDITION) if the stored content changed since — do NOT retry the same json, because it was built from a document that no longer exists: get_datafile again, re-apply your change to the content you just read, and send that with the new content_sha256. Omit for a blind overwrite, which is fine when nothing else writes this datafile (e.g. content you just created).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
jsonNo
slugYes
schema_idNo
datafile_idYes
descriptionYes
display_nameYes
content_sha256No
last_published_pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description adds critical context: it explains the concurrency safeguard via expected_content_sha256, that property order is preserved, that json replaces the whole document while metadata updates are partial, and that republishing pushes to the CDN. No contradictions with annotations.

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 long but every sentence earns its place. It front-loads the core purpose, then systematically covers the json-vs-metadata distinction, the alternative tool, the concurrency check, and the CDN push. No filler or redundancy.

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?

Covers all critical aspects: usage intent, alternative selection, concurrency safety, and the need to republish. With an output schema present, return values need not be described. The 7 parameters and nested structure are fully addressed through schema plus description.

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% with good parameter descriptions, but the description adds strategic value beyond the schema: it clarifies the semantic difference between json (whole document replacement) and metadata fields, and explains the expected_content_sha256 precondition (reject on concurrent change, do not retry same json). This is more than mere repetition.

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 (update) and resource (datafile), and clarifies it is a partial update at the field level. Explicitly distinguishes from patch_datafile, telling the agent exactly what this tool does versus the alternative.

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?

Directly instructs when to prefer patch_datafile ('To change PART of an existing document') and when to use this tool ('when you are replacing the whole document anyway'). Also explains the expected_content_sha256 workflow for safe round-trip updates, providing clear decision criteria.

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.

Resources