Skip to main content
Glama

Create Files

create
Destructive

Create up to 100 files at once, creating parent directories as needed. Supports overwrite or append mode for existing files, with confirmation prompts unless overwrite is set.

Instructions

Create one or more files (max 100), creating parent directories as needed. Pass files: [{ path, content }] — there is no single-path form. An existing file prompts the user to confirm the overwrite, so the call returns without writing anything until that confirmation comes back; set overwrite: true on an entry to replace it without the prompt. Set append: true on an entry to add to the end of an existing file (created if missing) instead of overwriting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filesYesList of files to create (max 100); each entry requires path and content

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.4.1
    • addedInput schema / $schema
      Added value: +"https://json-schema.org/draft/2020-12/schema"
  2. 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"
      +}
  3. Addedv2.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the destructiveHint annotation by explaining the confirmation flow: an existing file pauses the call and returns without writing until the user confirms. It also discloses parent-directory creation and append behavior, which are expected side effects an agent needs to anticipate.

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?

Three dense sentences front-load the core action and limits, then cover confirmation, overwrite, and append. Every sentence earns its place and no information is repeated unnecessarily.

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?

For a batch file-creation tool with a destructive hint and serious side effects, coverage is strong: max batch size, required fields, parent-directory creation, single-path absence, confirmation behavior, and overwrite/append variants are all stated. Nothing an agent needs to invoke it correctly is missing.

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 100%, so the schema already documents each field; baseline is 3. The description adds meaningful value by clarifying array-only input, the no-single-path restriction, and the overwrite confirmation behavior, which in turn explains the effect of overwrite: false.

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 operation ('create one or more files') with explicit limits (max 100) and behavior (creates parent directories). The note that there is no single-path form sharpens the contract and distinguishes it from file-editing siblings like edit and replace_text.

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?

Gives clear guidance on how to invoke the tool: pass an array of { path, content }, use overwrite: true to bypass the confirmation prompt, and append: true to add to an existing file. It does not explicitly name sibling alternatives or state when not to use create, so it stops short of a 5.

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