Skip to main content
Glama
flafkus
by flafkus

write_file

Destructive

Create or replace a text file in an Overleaf project, with automatic folder creation. Prevents overwriting files modified since the last read unless forced.

Instructions

Create or replace a text file. Missing folders are created.

Refuses to overwrite a file that changed since the last read_file, or that was only read in part, unless force=True.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesPath inside the project, e.g. sections/intro.tex
forceNoOverwrite even if the file changed since the last read
contentYesFull new file contents (whole-file replace)
projectYesProject id (24-char hex) or exact name

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

This is a destructive tool (destructiveHint=true), and the description goes beyond annotations by explaining exactly when it refuses to overwrite and how force bypasses that protection. It also discloses folder auto-creation, which is meaningful behavioral context not present in annotations.

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 two sentences, front-loaded with the core action, and every sentence adds useful information. There is no filler or repetition of schema content.

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?

With an output schema present, fully documented parameters, and annotations describing the destructive nature, the description supplies the remaining critical context: overwrite safety, the force escape hatch, and folder creation. Nothing essential for calling the tool correctly is missing.

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 the schema already documents all four parameters clearly. The tool description adds no parameter-level detail beyond the schema, so the baseline of 3 is appropriate.

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?

The description states a specific action ('Create or replace a text file') with a clear resource, and the 'whole-file replace' semantics in the schema distinguish it from the sibling edit_file. Missing-folder creation is also noted, making the tool's scope unambiguous.

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 makes it clear this is the tool for creating or fully replacing a file, and the safety rule implies when force is needed. However, it does not explicitly tell the agent when to prefer edit_file for partial modifications, so usage guidance is implied rather than stated.

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