Skip to main content
Glama

Upload a small file

upload-file
DestructiveIdempotent

Writes small text or base64 files into an existing Foundry data folder, validating accepted upload types and respecting overwrite control.

Instructions

Write a small file (at most 512 KiB) into an existing folder of Foundry's data storage, from text or from base64. An existing file is only replaced with overwrite: true. Scripts and HTML are never written, and Foundry accepts only its upload types. Never inside modules, systems or another world. Needs the write switch. Foundry cannot delete files; there is no tool for that.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesFile name with extension, such as "letter.md"
pathYesThe folder, such as "worlds/<world>/handouts"; it must exist (create-directory)
textNoContent of a text file, written as UTF-8
base64NoContent as base64 (a data: URL prefix is accepted); give text or base64
dryRunNoOnly check and report what would happen; nothing is written. Needs no write permission.
overwriteNoReplace a file of the same name

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv14.2609.4

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already indicate destructiveHint=true and idempotentHint=true, but the description adds crucial context: overwrite only happens when overwrite:true, certain file types (scripts/HTML) are refused, and Foundry cannot delete files. It also discloses the write-permission dependency. This goes beyond annotations and helps an agent anticipate non-obvious behavior.

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?

The description is three sentences, efficient and front-loaded with the core action and size/format constraints. Each sentence adds information: the action, the overwrite rule, and the safe-usage boundaries (types, locations, permissions, deletion limitation). No fluff or repetition.

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 6-parameter tool with 100% schema coverage and no output schema, the description covers all critical aspects: size limit, content sources, overwrite semantics, forbidden types, location restrictions, permission requirement, and the lack of deletion capability. An agent has enough context to call the tool correctly and avoid common mistakes.

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%, but the description enriches several parameters: it clarifies that text and base64 are alternative content sources, explains that overwrite controls replacement, and notes that dryRun requires no write permission. These additions help an agent choose and set parameters correctly beyond the raw schema descriptions.

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?

The description states a specific verb ('Write'), a clear resource ('a small file into an existing folder of Foundry's data storage'), and includes explicit constraints (max 512 KiB, from text or base64). This distinguishes it from siblings like create-directory, copy-file, and browse-files without needing to inspect the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool: writing files, with conditions like only replacing with overwrite:true, and restrictions on content types and locations (never modules/systems/worlds). It also notes the write switch requirement. While it doesn't explicitly name alternative tools for other file operations, the guidance is substantial and actionable.

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

Deploy Server

Other Tools