Skip to main content
Glama

overleaf_write_file

Create or overwrite a text file in an Overleaf project, automatically generating parent folders as needed. Write .tex, .bib, or .sty content directly to a specified project path.

Instructions

Create or overwrite a text file (.tex, .bib, .sty, etc.) directly in an Overleaf project.

Parent folders are created automatically if they do not exist.

Args: project: Overleaf project ID, project URL, or exact project title. remote_path: Destination path inside Overleaf (e.g. 'main.tex' or 'sections/methods.tex'). content: Full UTF-8 text content to write.

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

Input Schema

NameRequiredDescriptionDefault
contentYes
projectYes
remote_pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It does usefully warn that existing content is overwritten and that parent folders are auto-created, and it specifies UTF-8 text input; it says nothing about required auth/permissions, whether overwrite is unconditional, or how failures are reported, which matters for an unannotated mutation 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 mutation-and-scope sentence is front-loaded, the auto-folder behavior follows immediately, and the Args block is compact and skimmable. Every sentence adds information beyond the schema titles; no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need no explanation, and all three required params are described. What is missing for an unannotated write tool is auth/permission prerequisites and any note on encoding beyond UTF-8 or size limits, so it is adequate rather than 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 0%, so the description must compensate, and it largely does: 'project' is documented as accepting a project ID, URL, or exact title (a genuinely useful flexibility note), 'remote_path' is given with two concrete path examples, and 'content' is pinned to full UTF-8 text. Only the format/delimiting of paths on edge cases is left unstated.

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 names a specific verb+resource pair ('Create or overwrite a text file') and scopes it to an Overleaf project, with file extensions (.tex, .bib, .sty) clarifying it is text-oriented. It does not explicitly contrast with the sibling overleaf_upload_file, so the reader must infer that distinction from the extension list rather than a stated rule.

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?

Usage is implied by 'Create or overwrite' and the example paths, and the auto-folder note helps an agent decide it can write into non-existent directories. However, there is no explicit guidance on when to pick this over overleaf_upload_file or overleaf_upload_folder, nor any stated prerequisites such as prior authentication.

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