Skip to main content
Glama

workspace_write_file

Destructive

Create or fully overwrite a UTF-8 file in the workspace; the parent directory must exist. Returns removed/added line counts and linked change resources.

Instructions

Create or fully overwrite a UTF-8 file; its parent directory must exist.

Return removed/added line counts and linked change resources.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
textYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
actionYes
resourcesNo
lines_addedYes
lines_removedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.2

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuine context beyond that: the file is UTF-8, existing content is fully replaced, and the parent directory must pre-exist. It doesn't cover encoding failures or permission behavior, so not a 5.

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 short sentences, with the destructive create/overwrite action front-loaded and the prerequisite attached. The return-value sentence is borderline redundant given an output schema exists, but it is brief.

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 two-parameter write tool with annotations covering the destructive profile and an output schema covering the return shape, the description supplies the missing pieces: encoding and the parent-directory prerequisite. Remaining gaps (path conventions, overwrite failure modes) are minor.

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?

Schema description coverage is 0% and there are two parameters, so the description carries the full burden. It clarifies only that the content is UTF-8 text; neither 'path' (format, relative vs absolute, workspace scoping) nor 'text' semantics are explained.

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 and resource ('Create or fully overwrite a UTF-8 file'), and the word 'fully' signals the distinction from the sibling workspace_edit_file. It stops short of naming the alternative, so it isn't 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?

Gives a real prerequisite ('its parent directory must exist'), which is useful for correct invocation. But it never says when to choose this over workspace_edit_file or workspace_mkdir, so the when-to-use guidance is only implied.

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