Skip to main content
Glama

write_file

Destructive

Create or overwrite files in a ShareLaTeX project, updating text documents or re-uploading files and optionally checking SHA-256 to prevent stale writes.

Instructions

Create or overwrite a file in a ShareLaTeX project.

This changes the remote project. The MCP client controls user confirmation.
expected_sha256 optionally guards against stale content (UTF-8 SHA-256). project is a project name or id. An existing text
document is updated in place. An existing uploaded file is re-uploaded.
A missing file is created by upload. content is the full new text.

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": {
      "project": "<project>",
      "file_path": "<file_path>",
      "content": "<content>"
    },
    "name": "write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYes
projectYes
file_pathYes
expected_sha256No

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Beyond the annotations, the description adds that the tool changes the remote project, that the MCP client controls user confirmation, and that expected_sha256 guards against stale content. It also explains that behavior depends on whether the target is an existing text document, an existing uploaded file, or a missing file. This is meaningful behavioral context for a destructive write tool.

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?

The description is front-loaded with the core action and then adds only operationally relevant details. The short sentences are efficient and none appears to be filler, despite the slightly fragmented formatting.

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 destructive write tool with annotations already covering readOnly, destructive, idempotent, and openWorld hints, the description supplies the important extra context: confirmation ownership, overwrite semantics, stale-content guarding, and update behavior. It is close to complete, with only file_path semantics and any permission/prerequisite details missing, and an output schema exists so return values need not be explained.

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?

With 0% schema description coverage, the description does useful work by explaining that project is a name or id, content is the full new text, and expected_sha256 is an optional UTF-8 SHA-256 stale-content guard. It does not describe file_path semantics or path format, leaving one of four parameters undocumented.

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?

The description states a specific verb and resource: 'Create or overwrite a file in a ShareLaTeX project,' which is much clearer than the bare name. It does not explicitly name sibling alternatives such as append_to_file or replace_in_file, so sibling differentiation is only implicit through the word 'overwrite.'

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

Usage Guidelines3/5

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

The description implies this is for full-file writes by saying 'content is the full new text,' and it notes that an existing text document is updated in place while an existing uploaded file is re-uploaded. However, it gives no explicit when-to-use or when-not-to-use guidance versus append_to_file or replace_in_file.

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