Skip to main content
Glama

Create Files

create
Destructive

Write, overwrite, or append whole text files and make empty directories; missing parent folders are generated automatically.

Instructions

Write whole text files (create new ones, overwrite, or append) or make empty directories. Missing parent directories are created. edit or patch changes part of an existing file.

Input Schema

NameRequiredDescriptionDefault
filesNoList of files to create (max 100); each entry requires path and content; combined content is capped at the file-size limit
directoriesNoEmpty directories to create, like mkdir -p; one that already exists is left as it is

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.9.1
    • addedInput schema / properties / directories
      Added value: +{
      +  "description": "Empty directories to create, like mkdir -p; one that already exists is left as it is",
      +  "items": {
      +    "description": "File or directory path inside an allowed workspace root.",
      +    "maxLength": 4096,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  "maxItems": 100,
      +  "minItems": 1,
      +  "type": "array"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "files"
      -]
  2. Changed1 schema field changedv2.7.0
    • changedInput schema / properties / files / description
      Previous value: -"List of files to create (max 100); each entry requires path and content"New value: +"List of files to create (max 100); each entry requires path and content; combined content is capped at the file-size limit"
  3. Changed1 schema field changedv2.4.1
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
  4. Changed2 schema fields changedv2.3.0
    • addedInput schema / properties / files / items / properties / append
      Added value: +{
      +  "description": "Append the content to the end of the file instead of overwriting; creates the file if it does not exist",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / files / items / properties / overwrite
      Added value: +{
      +  "description": "Replace an existing file without asking the user; without it an existing file prompts for confirmation",
      +  "type": "boolean"
      +}
  5. Addedv2.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=true, so the safety profile is covered. The description adds genuinely useful behavior beyond that: missing parent directories are created automatically, and the tool writes verbatim content. It omits the confirmation/overwrite interaction, but that is in the schema.

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 tight sentences with zero filler; the capability and mode list come first and the disambiguation from edit/patch is front-loaded rather than buried.

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?

With no output schema, the description still covers the core write behaviors and the sibling boundary adequately, and detailed constraints (caps, path format, confirmation) live in the fully-covered schema. The remaining gap is that nothing is said about what happens on failure or what a call returns.

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% and both parameters are richly documented (append vs. overwrite semantics, the non-empty absolute path requirement, the 100-item and size caps). The description's 'create new ones, overwrite, or append' largely restates what the schema's append/overwrite fields already say, so the baseline 3 is correct.

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 ('Write whole text files ... or make empty directories') and enumerates the supported modes (create, overwrite, append). It explicitly distinguishes itself from the overlapping siblings edit and patch by scoping them to partial-file changes.

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

Usage Guidelines4/5

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

The second sentence gives a clear when-not rule: partial modifications belong to edit or patch, so whole-file writes belong here. It does not, however, say anything about how append vs. overwrite should be chosen or that a plain overwrite triggers a confirmation prompt, decisions an agent must get right.

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