Skip to main content
Glama

Create a New File

litewrite_create_file
Idempotent

Creates a new text file or directory in a Litewrite project. Specify the project, name, type, and optionally a parent folder and initial content.

Instructions

Create a new text file (or directory) in a Litewrite project (POST /api/internal/files/create).

Args:

  • projectId (string, required): The project id.

  • name (string, required): Name of the new file or folder, e.g. "notes.md".

  • type (string, required): "file" or "directory".

  • parentPath (string, optional): Parent directory relative to project root, e.g. "chapters".

  • content (string, optional): Initial text content for a file.

Returns a confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the new file or folder
typeYes'file' or 'directory'
contentNoInitial text content for a file
projectIdYesThe Litewrite project id
parentPathNoParent directory, e.g. 'chapters'

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, idempotentHint=true, and destructiveHint=false, so the safety profile is covered. The description adds the endpoint path and a terse 'Returns a confirmation,' but omits the consequence of a name collision (overwrite vs. error) and any permission requirements — useful gaps given the idempotentHint.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded one-line purpose followed by a clean per-parameter list; every line carries information and there is no filler. The args block slightly duplicates the schema but remains scannable.

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 mutating create tool with no output schema, the description covers inputs well and notes a confirmation return, but leaves conflict/overwrite behavior and directory-vs-file edge cases (e.g., content ignored for directories) unexplained. Annotations carry the safety burden, so this is adequate but not complete.

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 five parameters; the baseline is 3. The description adds concrete example values ('notes.md', 'chapters') that clarify intent, but nothing about formats or constraints beyond the schema.

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?

States a specific verb and resource ('Create a new text file (or directory)'), plus the target project and HTTP endpoint. However, it does not differentiate itself from the sibling litewrite_write_file, so an agent must infer that 'create' means new-file-only versus updating existing content.

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

Usage Guidelines2/5

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

The word 'new' implies creation-only usage, but there is no explicit when-to-use guidance, no mention of prerequisites (e.g., project must exist), and no routing versus the nearest alternative, litewrite_write_file. The agent is left to infer the distinction.

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