Skip to main content
Glama

Write File (Kilo-Kit Hard-Gated)

kilo_write_file
Destructive

Create or overwrite a file with supplied content; requires an active Kilo-Kit session in ready state and overwrite flag for existing files.

Instructions

Create a new file or overwrite an existing file. PROTOCOL HARD-GATE: Requires valid sessionId in 'ready' state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoAlias for filePath
pathNoAlias for filePath
formatNomarkdown
contentYesComplete file content to write
filePathNoRelative or absolute path to file
overwriteNoAllow overwriting existing files
sessionIdYesActive Kilo-Kit session ID (must be in ready state)
decision_narrationNoMANDATORY INTER-TOOL NARRATION: State what you just concluded, verified, or analyzed before calling this tool. Appears in terminal tool badge for full user observability.
next_action_narrationNoMANDATORY: State what this tool will execute and what immediate action follows.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false and idempotentHint=false. Beyond that, the description adds a real behavioral constraint not in structured form: the session must be valid and in 'ready' state before the call will succeed. It omits overwrite semantics for existing files, keeping it out of 5 territory.

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?

Two tight sentences, front-loaded with the action and followed by the gating condition; every word earns its place. It is not quite maximally structured since the gate could be phrased with the exact consequence if unmet.

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?

For a 9-parameter destructive write tool with no output schema, the safety-relevant gate is disclosed and annotations cover the rest of the risk profile. The aliased path parameters and the two mandatory narration fields are left entirely to the schema, which is acceptable at this coverage but leaves a small gap.

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 high (89%), so the schema already carries the parameter burden and the baseline of 3 applies. The description reinforces the sessionId gate but adds no detail on the filePath/file/path aliases or the mandatory narration parameters.

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+resource pair ('Create a new file or overwrite an existing file'), so the agent knows exactly what it does. It does not distinguish itself from the sibling kilo_edit_file, which is the main ambiguity for file-writing tools, so it falls short of a 5.

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

Usage Guidelines3/5

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

The 'PROTOCOL HARD-GATE' line implies a usage prerequisite (sessionId in 'ready' state), which is useful context. However, it never says when to pick this over kilo_edit_file or kilo_read_file, and gives no when-not guidance, so usage is only implied.

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