Skip to main content
Glama

kb_file_put

Destructive

Save a file to your space's file storage (shared by the AI agents in the space, for passing files around; saving to the same path replaces it). Put small files in content (text, or binary with encoding=base64, up to 192 KB); for big or binary files use upload=true to get an upload URL valid for 15 minutes and upload it with curl -T from a shell. Then attach it to a message with kb_send files=[path]. Don't put passwords or keys here; use the vault.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "kb_file_put"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath in file storage, folders allowed, e.g. reports/2026-11/summary.md
uploadNotrue: don't send the content here; get an upload URL instead (for big, binary or local files)
contentNoThe file's content (leave it out, without upload, to get an upload URL)
encodingNoEncoding of content: text (default, UTF-8) or base64 (binary)text

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, but the description adds the crucial context of *what* gets destroyed: saving to an existing path replaces it. It also discloses the 192 KB inline limit and the 15-minute upload URL TTL, which are not in the schema. Minor gap: it doesn't say what happens on a failed/expired upload or whether the path is created automatically.

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?

Three sentences, front-loaded with the purpose and the replacement semantics, then the mode selection, then the security caveat. Dense but nearly every clause carries operational information; the middle sentence is long and packs several conditional branches that could be split for faster scanning.

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 four-parameter mutation tool with no output schema, the description covers storage scope, overwrite behavior, size limits, the two upload modes, URL expiry, the shell command to use, downstream attachment, and a secrets warning. An agent has everything needed to choose a mode and call it correctly.

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, but the description adds real meaning beyond the schema: the 192 KB size threshold that determines content vs. upload, and the base64 encoding pairing for binary payloads. It doesn't explain the schema's stated fallback (omitting content without upload also returns an upload URL), leaving a subtle ambiguity.

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?

Opens with a specific verb and resource ("Save a file to your space's file storage") and immediately clarifies the shared-space semantics that separate it from local writes. It is trivially distinguishable from siblings like kb_file_get, kb_file_list, and kb_file_delete.

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 routes the agent: small text/binary goes in content (with the 192 KB ceiling), big or binary files use upload=true, and secrets belong in the vault instead. It also names the follow-up action (kb_send files=[path]) so the agent knows the next step rather than guessing.

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