Skip to main content
Glama

host.docs.put

Write (or, for an already-used name, create a new version of) a document in this tenant's document store. mime is detected from name and content when omitted; allowed mimes are text/plain, text/markdown, application/json, text/csv. content (or content_base64 for arbitrary bytes) must be at most MCPHOST_DOC_MAX_BYTES (default 2 MiB). Identical content to the current version is a no-op that repeats the current version.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mimeNoOne of text/plain, text/markdown, application/json, text/csv; detected from name/content when omitted.
nameYesDocument name; same name on a later put creates a new version of the same id.
contentNoDocument content as text; use content_base64 instead for arbitrary bytes.
metadataNoArbitrary caller metadata stored alongside the document; any JSON value.
tenant_keyNoThe key `signup` returned. Required only when this connection carries no Authorization: Bearer header -- when both are present, the header wins.
content_base64NoDocument content, base64-encoded; use content instead for plain text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly. It discloses versioning on name reuse, mime detection rules and allowed mimes, the size limit with its configurable default, and the no-op behavior for identical content. These are exactly the behavioral traits an agent needs to predict side effects.

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?

Three sentences, front-loaded with the core action, then the key constraints. Every sentence adds necessary information: versioning, mime handling, size limit, and idempotency behavior. No filler or repetition of schema details.

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?

For a write tool with six parameters and no output schema, the description covers the essential behavior: what it writes, versioning, mime constraints, size limit, and no-op semantics. It does not describe the success return value or error cases, but the absence of an output schema lowers the burden. A brief note on what a successful put returns would have made it complete.

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 adds value beyond the schema by explaining mime detection from name/content, the size limit applying to content and content_base64, and the no-op condition. It does not add much about metadata or tenant_key, but the schema already covers those adequately.

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 opens with a specific verb ('Write') and resource ('a document in this tenant's document store'), and immediately clarifies the versioning behavior for already-used names. This distinguishes it from sibling doc tools (get, list, delete, purge, status) without needing to name them.

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 gives clear context for when to use the tool: to write or create a new version of a document. It does not explicitly mention alternatives or exclusions, but the write-versus-read/delete distinction is implicit and obvious from the sibling list. A direct pointer to host.docs.get for reading would have made it a 5.

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