Skip to main content
Glama

Publish datafile

publish_datafile

Publish a datafile to a CDN path you choose, so a page can fetch() it client-side. Only needed for that client-side fetch — NOT to bind a datafile server-side (an endpoint's @latest datafile ref reads the stored draft directly). Pass expected_content_sha256 (from the create/update/get that produced this content) — publish fails if the content changed since, so you publish the exact version you intend. Returns the public CDN URL.

Input Schema

NameRequiredDescriptionDefault
datafile_idYesthe datafile id to publish
public_pathYesthe CDN path to publish at (e.g. data/products.json)
expected_content_sha256Yesthe content_sha256 returned by the create/update/get of this datafile; publish fails if the stored content has changed since, so publish the exact version you intend

Output Schema

NameRequiredDescriptionDefault
slugYes
public_urlYes
datafile_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Goes beyond the annotations by disclosing a real failure mode (publish fails if stored content changed since the hash was obtained) and the return payload (public CDN URL). It does not address what happens when re-publishing over an existing public_path, which matters given destructiveHint=false and idempotentHint=false, but the added context is substantive.

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-loads what the tool does, then the usage exclusion, then the concurrency guard — a sensible order with no filler. Slightly redundant in re-explaining expected_content_sha256 after the schema already does so, which keeps it from a 5.

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?

An output schema exists, so return-value detail is optional, yet the description still names the URL result. For a mutation with an optimistic-concurrency guard, the key operational facts (precondition, failure behavior, when not to use) are present; only overwrite/republish semantics at an existing path are unaddressed.

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 coverage is 100%, so the baseline is 3; the description's explanation of expected_content_sha256 largely restates the schema's own wording ('from the create/update/get that produced this content'). public_path and datafile_id are covered entirely by the schema, so the description adds little parameter-level meaning beyond what is already structured.

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?

Names a specific verb and resource (publish a datafile) plus the concrete outcome: a CDN path fetchable client-side. It also explicitly carves itself out from the sibling create/update/get flow and from server-side @latest datafile refs, so an agent can distinguish it from unpublish_datafile and publish_* siblings at a glance.

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?

States both the when ('Only needed for that client-side fetch') and the when-not ('NOT to bind a datafile server-side') and names the alternative mechanism that makes this tool unnecessary in that case. The precondition for the sha256 argument is also spelled out as a usage rule rather than 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.

Resources