Skip to main content
Glama

Upload data file

upload_data_file
Destructive

Store a JSON or CSV data file for the site and get a public URL that an embed's script can fetch() — for a browser-side widget that needs a dataset (a product finder, a price table, a store locator). Never paste the data into the embed itself, and never hide it in an image. Sources, exactly one: url (a public link — published Google Sheet, Drive/Dropbox share link, any direct file), content (inline text up to 100,000 characters), or mode:"link" (the owner uploads the file in their browser). Up to 2MB stored. Same name replaces the file at the same URL. A CSV is stored as an array of row objects (as:"csv" keeps it as given). Returns the url, row count, the data's shape and a ready fetch line.

Input Schema

NameRequiredDescriptionDefault
asNoWhat a CSV is stored as. "json" (default): an array of row objects (header row = keys; plain numbers become numbers, leading-zero values like zip codes stay strings), so the widget reads it with fetch(url).then(r => r.json()) and never parses CSV. "csv": the file as given. JSON input is stored as JSON either way.
urlNoA public link to a JSON or CSV file, fetched by Sitelas. Works with a Google Sheet published to the web as CSV, a Google Drive or Dropbox share link set to 'anyone with the link' (rewritten to its direct download), or any direct file URL. Use this for anything big. Give exactly one of url, content or mode.
modeNo"link": the file is on the owner's computer. Returns a one-time upload page (link_url) to give the owner; the file lands at the returned url once they upload. Give exactly one of url, content or mode.
nameYesFile name: lowercase letters, digits and hyphens, 1–64 characters, no extension (e.g. 'car-models'). Uploading again under the same name REPLACES the file, and its URL stays the same — so a widget keeps working when the data is updated.
contentNoThe file's text, JSON or CSV, written inline — up to 100,000 characters. Bigger data must come through url, or mode:"link" for a file only the owner has. Give exactly one of url, content or mode.
site_idYesThe site the data file belongs to.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial context beyond the annotations: the 2MB storage cap, the 100,000-character inline limit, replacement semantics under the same name at a stable URL, CSV normalization into row objects, and even a summary of the return payload (url, row count, shape, fetch line). The replacement/overwrite behavior is consistent with destructiveHint=true, and the stable-URL nuance usefully qualifies the idempotentHint=false annotation.

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 purpose and the key 'never do this' guidance, and nearly every clause carries a distinct constraint. It is a dense single paragraph, however, and the source-selection rules would be more scannable as a short list.

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?

No output schema exists, and the description still covers the return payload, size limits, format conversion, overwrite behavior, and the asynchronous link-mode flow. Nothing material is missing for an agent to select a source and invoke this 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 coverage is 100% and the schema descriptions already carry the mutual-exclusion rule, the CSV `as` modes, the name pattern, and the link-mode flow. The description restates the exactly-one-of rule and the size thresholds but adds no syntax or format detail beyond the schema, so the baseline 3 applies.

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 (store a JSON or CSV data file) plus the concrete outcome (public URL fetchable by an embed's script), and gives example use cases (product finder, price table, store locator). This clearly separates it from upload_image and from add_content_item in the sibling list.

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 rules out alternatives ('Never paste the data into the embed itself, and never hide it in an image') and gives a decision rule among the three sources: url for anything big, content up to 100,000 characters, mode:"link" for a file only the owner has.

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