Skip to main content
Glama

overwriteFileTool

Overwrite a file in FileMCP's AgentFiles directory by providing the file name and new content, replacing existing data safely.

Instructions

Overwrites a file with the specified name and content under 'AgentFiles'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fileName": "<fileName>",
      "content": "<content>"
    },
    "name": "overwriteFileTool"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesThe content to be written to the file.
fileNameYesThe name of the file to be overwritten.

Output Schema

NameRequiredDescriptionDefault
textYesThe result of the file overwrite operation, indicating success or failure.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.0

TDQS

B3.1/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. 'Overwrites' conveys destructive content replacement, but it does not say what happens if the file is absent (error or create), whether the replacement is reversible, or what permissions are required.

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?

A single front-loaded sentence with the verb, resource, and scope; no filler or redundancy.

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?

Return values need not be explained since an output schema exists, and both required params are covered by the schema. However, nothing is said about missing-file behavior or how to choose between this and createFileTool, leaving meaningful gaps for a mutation tool with no annotations.

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 both parameters are already documented; the baseline is 3. The description adds a useful location constraint ('under AgentFiles') but no format, path syntax, or size guidance beyond the schema.

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 specific verb (overwrites) and resource (file), and adds the 'AgentFiles' scope. It does not explicitly contrast with the sibling createFileTool, but 'overwrites' vs 'create' implicitly differentiates them.

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

Usage Guidelines2/5

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

No when-to-use guidance is given. The agent must infer that this targets existing files while createFileTool handles new ones; no condition, prerequisite, or excluded alternative is stated.

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