Skip to main content
Glama

rewrite_file

Destructive

Replace entire file content in a remote Typleaf project, then automatically commit and push changes.

Instructions

Replace entire file contents. Commits and pushes immediately.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesNew full file content
file_pathYes
project_idYesTypleaf project ID — a 24-character lowercase hex string (e.g. '692a83fb82feceb233c4b0e7'), obtained from list_projects or the project URL. NOT a local filesystem path, NOT '.', NOT a project name or title. These tools operate on the REMOTE Typleaf project. Only call these tools when the user explicitly asks to work with a Typleaf project — never for general local file I/O. If you already have a copy of THIS project checked out on the local filesystem, prefer the standard read/grep tools against that path. Always call list_projects first when unsure.
commit_messageNo
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 description doesn't need to restate that. It adds valuable behavioral context beyond annotations by specifying that the operation 'commits and pushes immediately', which is a significant side effect an agent should know. This goes beyond what annotations convey.

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 extremely concise at two short sentences, with the primary action ('Replace entire file contents') front-loaded and no filler. Every word adds value, making it highly scannable for an agent.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive operation that commits and pushes remotely, the description is under-specified. It does not clarify how commit_message is handled when omitted, what happens if the file does not exist, or how file_path should be interpreted relative to the project root. The minimalism leaves an agent guessing on crucial execution details.

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?

With 50% schema coverage, the description should compensate for undocumented parameters like file_path and commit_message, but it doesn't. It only implicitly ties to content via 'replace entire file contents'. No guidance is given on file_path format or commit_message requirements, leaving those ambiguous.

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 clearly states it replaces the entire file contents, which is a specific verb+resource. It also notes immediate commit/push behavior, distinguishing it from partial editors like edit_file. However, it does not explicitly contrast with similar sibling tools like write_files, so it lacks full differentiation.

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

Usage Guidelines1/5

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

No guidance is given on when to use this tool versus alternatives. The description only states what it does without mentioning scenarios like 'prefer edit_file for partial changes' or 'use create_file for new files'. The project_id schema description gives general context for Typleaf tools, but not about this specific tool's usage.

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/superzeldalink/typleaf-mcp'

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