Skip to main content
Glama
kagan-sh

Kagan - AI Orchestration Layer

fs_write_file

Write content to a file, creating or overwriting it. Use for new files or full rewrites without preserving existing BOM or EOL style.

Instructions

Write content to a file, creating or overwriting it.

Use this for new files or full rewrites. Does not preserve existing BOM or EOL style — use fs_edit_file for that.

Returns: {"path", "bytes_written", "bom_preserved", "eol_style"}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses that the tool creates or overwrites files, does not preserve BOM/EOL, and lists the return fields. However, it omits details like whether parent directories are created, handling of paths, or error behavior. Still, for a simple file write tool, it is fairly transparent.

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 three sentences with no extraneous words. The first sentence states the purpose, the second gives usage guidance, and the third specifies the return value. It is front-loaded and efficient.

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?

Given the simple input schema and lack of output schema, the description covers key points: when to use, how it differs from sibling, and return fields. However, it omits important context for a write tool, such as whether it overwrites silently, encoding expectations, or error handling. This leaves gaps for an agent.

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?

Input schema coverage is 0%, so the description must add meaning. It only implicitly refers to 'content' and 'path' without explaining their format, constraints, or semantics. For example, it does not clarify if the path is absolute/relative or if content is plain text. The description adds little beyond the schema property names.

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 'Write content to a file, creating or overwriting it.', specifying the verb (write), resource (file), and action (create/overwrite). It also distinguishes this tool from its sibling fs_edit_file by noting that it does not preserve BOM or EOL style.

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

Usage Guidelines5/5

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

The description provides explicit guidance: 'Use this for new files or full rewrites.' and contrasts with the sibling tool: 'Does not preserve existing BOM or EOL style — use fs_edit_file for that.' This clearly tells the agent when to use this tool and when to use an alternative.

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/kagan-sh/kagan'

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