Skip to main content
Glama

Create a new text doc

create_doc

Create a new .tex, .bib, or other document at a project-relative path in an Overleaf project, optionally adding initial content; creation fails if the path already exists.

Instructions

Creates a new .tex/.bib/... doc at path, optionally with initial content. Fails if the path already exists.

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

Input Schema

NameRequiredDescriptionDefault
pathYesProject-relative path of the new doc, e.g. 'sec/related.tex'.
contentNoInitial text. Written as a direct (untracked) edit right after creation, like pasting into a new file.
project_idNoOverleaf project id from list_projects or open_project. Opens the project if it is not already active. Pass it on every call when MCP sessions may change between calls. Writes without it only go to the project last confirmed by open_project or by a write naming it.
create_parentsNoCreate missing parent folders (default: true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral burden; it does disclose the key failure mode (path collision) and the optional initial content. It says nothing about required permissions, whether the new doc is tracked or untracked in track-changes mode, or what the call returns — the richest behavioral detail (untracked direct edit, project_id session semantics) lives only in the schema, not the description.

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?

Two sentences, zero filler, with the operation front-loaded and the constraint immediately after. Every clause carries information an agent needs.

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?

For a 4-parameter mutation tool with no annotations and no output schema, the description covers the core action and the main failure mode but omits permissions, return value, and interaction with tracked-changes state. Adequate but with clear gaps in the behavioral envelope.

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 explains project_id session semantics, create_parents defaulting to true, and content being written as a direct untracked edit. The description only restates `path` and 'initial content', adding no meaning beyond the structured fields — baseline 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?

States a specific verb and resource ('Creates a new .tex/.bib/... doc at `path`') and enumerates the file kinds it handles, which separates it from create_folder and upload_file without the reader needing another schema. The failure condition is included in the same breath, so the operation's identity is 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 precondition 'Fails if the path already exists' gives a real selection signal — an agent knows to check via list_files/read_file before calling. However, it never says when to choose this over upload_file (existing content) or edit_file (existing doc), so the routing decision is left to inference.

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