Skip to main content
Glama

create_file

Destructive

Create a new UTF-8 text file within an active session: revalidates the target and parent, blocks sensitive content, and never overwrites existing files.

Instructions

Create a new bounded UTF-8 text file inside an active Direct session. The target and its parent are revalidated, sensitive content is blocked, and existing targets are never overwritten.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesNew repository-relative file path.
contentYesUTF-8 text content subject to Direct size and sensitive-content guards.
review_idNoFresh review ID for this exact create proposal when required.
session_idYes
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds meaningful behavioral context beyond that: files are bounded, the target and parent are revalidated, sensitive content is blocked, and existing targets are never overwritten. This discloses important side effects and constraints, going beyond the annotations without contradicting them.

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?

The description is two sentences, front-loaded with the primary purpose, and every clause earns its place by adding key behavioral or contextual information. No filler or redundancy.

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?

Given the tool's complexity (4 parameters, no output schema) and the presence of annotations, the description covers the essential purpose, key constraints, and behavior. It lacks explicit success/error return details and does not specify when review_id is required, but these are minor gaps for a create operation and the description is sufficiently complete for an AI to select and invoke the tool.

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?

The input schema covers 75% of parameters with descriptions; the description adds context that helps interpret the parameters: 'bounded' and 'sensitive content blocked' clarify content constraints, 'revalidated' and 'repository-relative' inform path semantics, and 'inside an active Direct session' gives meaning to session_id, which lacks a schema description. This adds value beyond the schema without fully detailing each parameter.

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?

The description clearly states the verb 'Create' and the resource 'a new bounded UTF-8 text file inside an active Direct session.' It distinguishes from sibling tools by specifying 'bounded', 'UTF-8', 'inside an active Direct session', and 'existing targets are never overwritten', making its purpose unambiguous relative to file operations like apply_patch, move_file, and delete_file.

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 description provides clear context: it is for creating new text files within an active Direct session, with revalidation and sensitive-content blocking. It implies when not to use (when updating/overwriting an existing file) via 'never overwritten' but does not explicitly name alternative tools. This is clear context without exclusions, matching a score of 4.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jiezeng2004-design/PatchWarden'

If you have feedback or need assistance with the MCP directory API, please join our Discord server