Skip to main content
Glama
shanmukhdatta

workspace-mcp

update_file

Update an existing file by either replacing specific text or overwriting its entire content.

Instructions

Update part or all of an existing file.

Use EITHER (find, replace) for a literal text substitution, OR new_content for a full rewrite -- do not pass both.

Args: path: Path relative to the workspace root. Must already exist. find: Literal text to search for (mutually exclusive with new_content). replace: Replacement text for every match of find (default: ""). new_content: Full replacement content for the file. count: Max number of find occurrences to replace (-1 = all).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
findNo
pathYes
countNo
replaceNo
new_contentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the transparency burden. It discloses the mutex between find/replace and new_content, the every-match replacement behavior, the count parameter limiting replacements, and the requirement that path 'Must already exist.' It falls short of describing error conditions when find has no matches.

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 front-loaded with a one-sentence summary, then a clear usage note, followed by a bullet-like arg list. Every sentence adds information—no filler.

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 mutation tool with five parameters and no annotations, the description covers the two operational modes, parameter semantics, and the existing-file requirement. It omits failure behaviors, but the presence of an output schema reduces the need to document return values. Overall it is substantial but not exhaustive.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema provides no descriptions (0% coverage), so the description compensates fully by defining each parameter: path, find, replace, new_content, and count, including defaults and mutual exclusivity. This adds complete meaning beyond the raw schema.

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 opens with 'Update part or all of an existing file,' which identifies the verb (update), resource (file), and scope (part or all). It clearly distinguishes from sibling tools like create_file and append_file by specifying 'existing file.'

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

Usage Guidelines4/5

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

It provides explicit usage guidance for parameter combinations: 'Use EITHER (find, replace) for a literal text substitution, OR new_content for a full rewrite -- do not pass both.' However, it does not explicitly name alternative tools or state when not to use this tool, though 'existing file' implies a prerequisite.

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/shanmukhdatta/workspace-mcp'

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