Skip to main content
Glama
claucloverleaf

claucloverleaf

by SolthaX

overleaf_write_file

Destructive

Create or replace a document's full content in an Overleaf project, sending only changed lines to preserve collaborator cursors and optionally submitting tracked changes; missing folders are created.

Instructions

Create a text document, or replace an existing one's whole content.

Only the lines that differ are sent, so collaborators' cursors elsewhere are preserved. Missing folders in the path are created.

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>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "overleaf_write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath in the project, e.g. 'main.tex' or 'chapters/intro.tex'.
contentYesFull new content of the document.
projectYesProject id, Overleaf project URL, or exact project name.
track_changesNoSubmit as a tracked change (suggestion) instead of a direct edit.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructive=true, readOnly=false, and openWorld=true. The description adds valuable behavior beyond those annotations: writes are sent as line-level diffs to preserve collaborators' cursors, and missing folders in the path are created automatically. It could additionally warn about overwrite irreversibility, but the added behavioral context is meaningful.

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 three short, front-loaded sentences with no wasted wording. Each sentence adds distinct information: operation scope, diff/cursor behavior, and automatic folder creation.

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 operation with annotations and an output schema, the description covers create/replace scope, diff transmission, cursor preservation, and folder side effects. It omits an explicit note about overwrite consequences and track_changes behavior, but those are covered by annotations and the input schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are already well documented. The description adds some path semantics (missing folders are created) and content semantics (only differing lines are sent), but it does not explain track_changes or project resolution beyond what the schema already provides.

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?

It states a specific verb and resource: create a text document or replace an existing document's whole content. 'Whole content' distinguishes it from partial-edit siblings like overleaf_replace_text and overleaf_insert_lines, but it does not explicitly contrast with overleaf_upload_file or overleaf_create_folder.

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 use for creating or fully replacing a text document, which is clear context. However, it does not explicitly say when to choose it over overleaf_replace_text, overleaf_replace_lines, overleaf_insert_lines, or overleaf_upload_file, nor does it state exclusions or prerequisites.

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