Skip to main content
Glama
ShiYioo

opencode_native_tools

by ShiYioo

write

Creates a new text file or overwrites an existing one at the specified path, using the provided content. Ideal for full-file replacement when targeted edits are insufficient.

Instructions

Write a text file to the local filesystem. An existing file is overwritten. Prefer edit for an existing file when a targeted replacement is sufficient.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe content to write to the file
filePathYesThe absolute path to the file to write
Behavior4/5

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

With no annotations, the description carries the burden of disclosing behavior. It clearly states that an existing file is overwritten, which is the key destructive side effect. It does not mention auxiliary details like permission requirements or return values, but the core behavioral trait is well covered.

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 a compact two-sentence structure with no wasted words. The first sentence states the core function, the second adds important behavioral and usage guidance, making every word earn its place.

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 low complexity and complete schema, the description is nearly sufficient. It covers the primary operation, the overwrite behavior, and the alternative tool. It does not describe return values, but for a write operation this omission is minor and not required by the guidelines when no output schema exists.

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?

The input schema already fully describes both parameters (filePath and content) with clear descriptions and 100% coverage. The tool description adds no new parameter-level detail, but it does not need to since the schema is self-sufficient. Baseline 3 is appropriate.

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 tool writes a text file to the local filesystem, using a specific verb and resource. It also distinguishes itself from the sibling 'edit' tool by noting when write is preferred, making the purpose unambiguous.

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 explicitly tells the agent to prefer 'edit' for existing files when a targeted replacement is sufficient, providing a clear when-not-to-use condition and naming an alternative. This goes beyond simple context to give actionable guidance.

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/ShiYioo/opencode_native_tools'

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