Skip to main content
Glama

Store an app file

file_write
DestructiveIdempotent

Create or overwrite an app's file from base64 data, persisting it for reuse across chats. Pass the file bytes, app, and path to store it.

Instructions

Store a file for an app (create or overwrite by path). data_base64 is the file bytes, base64-encoded — pass any file the user gave you or that you generated. Overwriting an existing path bumps its version. Single-call writes are limited to a few MiB. Files persist and are the app's own, reusable across chats.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYesthe app this file belongs to
mimeNocontent type, e.g. 'image/png' (default application/octet-stream)
pathYeslogical file name, e.g. 'receipt.pdf' or 'exports/2026-q1.csv'
command_idYesidempotency key — a fresh uuid per write
data_base64Yesfile bytes, base64-encoded
expected_versionNothe version you last saw, for optimistic concurrency (optional)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
appYes
mimeYes
pathYes
sizeYes
sha256Yes
versionYes
files_versionYes
Behavior5/5

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

Beyond the annotations (destructive, idempotent), the description adds valuable behavioral details: overwriting bumps version, writes are limited to a few MiB, files persist, and are app-owned and reusable across chats. This enriches the agent's understanding of side effects and constraints without contradicting any annotation.

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?

Four sentences, front-loaded with the core purpose, and every sentence contributes meaningful information (purpose, data_base64 handling, version bump, size limit, persistence). No redundant wording or filler.

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?

Given the output schema exists, the description fully covers the essential context: file persistence, overwrite behavior, versioning, size constraints, and cross-chat reusability. It is complete enough for an agent to use the tool correctly without further clarification.

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 elevates the meaning of data_base64 with explicit guidance ('pass any file the user gave you or that you generated') and clarifies overwrite/version semantics that tie to expected_version. Other parameters are adequately self-describing in 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?

The description clearly states the tool's function: 'Store a file for an app (create or overwrite by path).' The verb 'store' plus the resource 'app file' and the create/overwrite behavior precisely distinguish it from sibling tools like file_write_begin and file_write_chunk, which handle multi-part writes.

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: it accepts any file the user gave or the agent generated, and it notes that single-call writes are limited to a few MiB, implying larger files should use the chunked write tools. However, it does not explicitly name the alternative tools, so it stops short of a fully explicit when-not-to-use directive.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/2nd1st/open-mcp-apps'

If you have feedback or need assistance with the MCP directory API, please join our Discord server