Skip to main content
Glama
lllli223

codex-workspace-codegraph-mcp

by lllli223

写入文件

write_file
Destructive

Atomically create or overwrite text files with full content. Use for new files or complete rewrites; for precise edits, choose edit_file or apply_patch instead.

Instructions

以原子替换方式创建或完整写入文本文件。已有文件默认允许覆盖;精确修改优先使用 edit_file 或 apply_patch。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
overwriteNo
create_onlyNo
Behavior4/5

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

Annotations already indicate destructiveHint=true. The description adds useful behavioral context beyond that: atomic replacement semantics, default overwrite of existing files, and the fact that it performs full writes rather than targeted edits.

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 carry the essential information: operation type, atomics, overwrite default, and routing to alternatives. There is no wasted text and the most important behavioral detail is front-loaded.

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 destructive write tool with four simple parameters, the description is mostly complete: it states what it writes, how it writes atomically, the overwrite default, and when to prefer alternatives. Slight gap: no explicit guidance on create_only or what happens when the file already exists under that mode, though the schema default hints at it.

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 0%, so the description must compensate. It does clarify the overwrite default, but it does not explain the create_only parameter or explicitly map path/content semantics. The parameter names and defaults are reasonably self-explanatory, but the description does not fully cover all four parameters.

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 states a specific verb ('create or completely write') and resource ('text file') and clarifies the atomic replacement behavior. It also explicitly distinguishes itself from siblings by naming edit_file and apply_patch as alternatives for precise modifications.

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 gives clear usage context: use this tool for full-file creation/writing, while precise edits should use edit_file or apply_patch. This provides both when-to-use and when-not-to-use guidance with named alternatives.

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/lllli223/codex-workspace-codegraph-mcp'

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