Skip to main content
Glama

create_file

Writes a file with given content, creates missing parent directories, and uses atomic writes to avoid partial or corrupted files.

Instructions

Create a file (and parent dirs) with the given content. Writes are atomic.

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes
overwriteNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.1/5.0
Behavior3/5

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

Adds real value beyond the annotations by disclosing that parent directories are created and that writes are atomic. However, it never says what happens when the file already exists, which is the single most decision-relevant behavior for a create tool with an `overwrite` flag defaulting to false.

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 short sentences, front-loaded with the action and the key guarantee. Nothing padded, nothing buried.

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?

Output schema exists, so return values need no explanation, and the atomicity note covers a key guarantee. Missing the existing-file/overwrite behavior and any error conditions, which for a mutation tool with zero schema description coverage is a meaningful gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, yet it explains none of the three parameters. `path` and `content` are guessable from their names, but `overwrite` is never mentioned, leaving the overwrite semantics undocumented everywhere.

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 file') plus a useful side effect ('and parent dirs'), which is enough to tell it apart from edit_file and create_directory in the sibling list. It stops short of explicitly contrasting with the edit-family tools.

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?

No guidance on when to use this instead of edit_file, edit_file_multi, or create_directory, even though those siblings overlap heavily with its job. The agent must infer selection from name alone.

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