Skip to main content
Glama

Update datafile

update_datafile

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. Dates show when Glama detected each change.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations are minimal (openWorldHint, destructiveHint), so the description carries the disclosure burden and delivers: whole-document replacement semantics, verbatim property-order preservation, optimistic concurrency via expected_content_sha256 with FAILED_PRECONDITION rejection on conflict, and the explicit post-condition that the change must be republished to reach the CDN. These behavioral traits go well beyond what the annotations declare.

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?

Seven sentences, each carrying distinct information: the core operation, field-level semantics, document-replacement semantics, sibling routing, concurrency workflow guidance, and the republish post-condition. It is front-loaded with the core verb, but it is a single dense paragraph with minor redundancy around 'property order preserved verbatim,' which keeps it just shy of zero-waste.

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?

For a tool of this complexity — 7 params, concurrency control, update/patch sibling ambiguity, and a CDN side-effect — the description covers the semantic core, the routing decision, the concurrency failure workflow, and the republish requirement. The schema covers parameter details and the output schema covers return values, so nothing an agent needs to call this correctly is missing. The only minor gap is that the republish sibling (publish_datafile) is not named, but it is obvious from the sibling list.

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 baseline is 3. The description earns a 4 by adding cross-parameter workflow meaning the individual schema docs do not provide: the coupling of json with expected_content_sha256 as a required round trip ('get_datafile, change the object you got back, then send it all') and the relationship between providing json (whole-document replace) versus omitting it (metadata-only). This synthesis is genuine added value over 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 the operation as 'Update a datafile' and immediately resolves the ambiguous update-vs-patch semantics: field-level partial update where only provided arguments change, while the json argument replaces the WHOLE document and omitting it changes only metadata. It explicitly distinguishes itself from patch_datafile, so an agent can tell the two apart without opening either schema.

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?

Names patch_datafile explicitly as the alternative for partial document edits and states the deciding condition: 'Use this tool when you are replacing the whole document anyway.' It justifies the routing with the concurrency argument ('cannot lose a concurrent write') and adds the get-modify-send round-trip workflow with expected_content_sha256. Nothing is left to inference.

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.

TDQS

A4/5.0
Disambiguation5/5

Every resource family follows the same verb+noun pattern and each tool name uniquely identifies a resource-action pair (create_app vs create_app_version vs update_app vs publish_app). Closest overlaps like analyze_resource vs get_resource_graph and patch_datafile vs update_datafile are explicitly differentiated by their descriptions, so misselection risk is low despite the scale.

Naming Consistency5/5

Names are almost uniformly verb_noun snake_case with a consistent lifecycle vocabulary: create/get/update/delete/list/publish/unpublish/version. Minor outliers like whoami and run_schedule_now are idiomatic and do not break the predictability of the set.

Tool Count1/5

At 93 tools this far exceeds the calibration's 50+ extreme-mismatch case. The count is inflated by repeating create/get/update/delete/version/publish/unpublish across ten resource families; even though each family is systematic, the combined surface is very hard for an agent to navigate and keep in context.

Completeness4/5

Core CRUD/publish/version lifecycles are present for apps, workflows, endpoints, schedules, schemas, datafiles, and api templates, and dependency analysis is well covered. However, secret creation/updating, asset upload, custom-domain deletion, and version-range enumeration for several resource types are absent or left to the external dashboard, so agents hit a few manual dead ends.

Resources