Skip to main content
Glama

Write

write
Destructive

Writes a whole note, app file, data.json or file: creates it, or replaces all of it (an existing item must have been read in this session). The old version stays in history. A new note goes in the folder its path names; one with no folder goes in the first folder, usually Notes. A file ("To read/Summary.txt", "To read/Paper.pdf") takes content for text, or content_base64 with mime_type for anything else (a PDF, a picture, a spreadsheet), up to 10 MB. Answers with checks: what the change broke in a note, or the app's compile, render and test results. Notes are markdown: checklists "- [ ] item", links to notes [[Title]], and a tracker is a table with a line like above it (keep values in range).

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": "write"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileNoA file from the chat (ChatGPT hands these over), instead of content_base64.
pathYesA path, as list and search show them: "Work/Acme.md", a folder "Work/", a sub-note "Work/Acme/Agenda.md", a note's file "Work/Acme/contract.pdf", a file in a folder "To read/Paper.pdf", an app's file "Work/Habits.app/src/App.tsx" or its data "Work/Habits.app/data.json".
contentNoThe whole text (data.json: JSON).
mime_typeNoWith content_base64, like "application/pdf".
content_base64NoA file's bytes, base64 (up to 10 MB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / file / required
      Added value: +[
      +  "download_url",
      +  "file_id"
      +]
  2. Added

TDQS

A4.3/5.0
Behavior5/5

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

Annotations declare destructiveHint=true but the description adds the mitigating behavior: the old version stays in history, so the destruction is recoverable. It also discloses the read-before-write precondition, the 10 MB ceiling, folder-default placement, and what the call returns (checks, breakage report, app compile/render/test results) — all valuable given no output schema exists.

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 the core action and replacement semantics; the trailing markdown/tracker conventions are dense but operational. The long parenthetical sentences (

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 destructive 5-parameter write with a nested object and no output schema, the description covers prerequisites, size limits, path-to-folder resolution, return values, and format conventions. An agent has enough to call it correctly without guessing.

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 earns more by explaining the content-vs-content_base64/mime_type split for non-text files, the size limit, and how a path determines folder placement. The nested 'file' parameter is left to its schema description only, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb and scope: writes a *whole* note, app file, data.json or file, either creating or fully replacing. The word 'whole' implicitly separates it from the partial-change sibling 'edit', but no sibling is named, so the agent must infer the boundary. Clear and distinct, but not explicitly differentiated.

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?

Gives a real prerequisite ('an existing item must have been read in this session') and implies when to use this over a partial edit by emphasizing whole-item replacement. It never names an alternative tool or an explicit when-not case, so the routing guidance is contextual rather than explicit.

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.