Skip to main content
Glama
Menglook
by Menglook

Write File

write
Destructive

Create or overwrite a meaningful text file inside the workspace with parent directory creation and returns the resulting unified diff.

Instructions

Create or overwrite a meaningful text file inside the workspace. Returns a unified diff; do not create empty placeholder files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesFile path relative to workspace root.
contentYesComplete file contents to write.
overwriteNoAllow overwriting existing files. Default: true.
task_modeNoOptional Task Router mode override for this write.
create_dirsNoCreate parent directories if missing. Default: true.
workspace_idNoOptional workspace id. When omitted, CodexPro binds the authoritative conversation workspace automatically; an explicit unknown or mismatched id is rejected.
conversation_idNoConnector conversation id bound to this workspace. Modern MCP injects it automatically; side-effecting tools require it to match the authoritative binding.
task_instructionNoOptional original user task for Task Router mode control.
workspace_generationNoOptional authoritative workspace generation. When omitted, CodexPro injects the conversation-bound generation; an explicit stale generation is rejected.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tool_resultYes
Behavior3/5

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

Annotations declare destructiveHint=true and readOnlyHint=false, so the write operation is already flagged as potentially destructive. The description adds useful context: it returns a unified diff and forbids empty placeholder files. However, it does not state that overwriting is the default behavior (the schema's overwrite default of true), nor explain implications of the workspace_generation/workspace_id staleness rejection behavior. With destructiveHint annotation present, the bar is lower, and the description adds reasonable context.

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 concise sentences that are front-loaded with purpose and add the return-type and no-empty-files guidance. No waste, but could mention the diff return more prominently or add a sibling contrast. Efficient and focused.

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?

The tool has 9 parameters (complex, with workspace_generation/workspace_id staleness handling and task_mode overrides) and an output schema exists. The description covers the core purpose but leaves the workspace binding/generation semantics and task_mode routing unexplained in prose. Given the tool's complexity and many sibling alternatives (edit, apply_patch_bundle, bash), the description is somewhat thin for guiding correct selection among complex options.

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 100%, so all 9 parameters are documented in the schema. The description adds only the unified-diff return and no-empty-file guidance, which doesn't map specifically to parameters. The overwrite default (true) and create_dirs default (true) are in the schema but not surfaced in the description. Baseline 3 is appropriate since schema covers all parameters adequately.

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?

The description states a clear verb+resource: 'Create or overwrite a meaningful text file inside the workspace.' It distinguishes its primary purpose from siblings like read, edit, and bash. However, it doesn't explicitly contrast with edit (its closest sibling), and the mention of the diff return is useful context that differentiates it from simple write tools.

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 description conveys that this is for creating meaningful text content in the workspace and warns not to create empty placeholder files. However, it does not explicitly state when to use this vs. the edit tool (which is a sibling) for modifying existing files, nor does it mention any exclusions or prerequisites. The usage context is implied rather than explicit.

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/Menglook/codexpro-runtime'

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