Skip to main content
Glama
GongRzhe

Terminal Controller for MCP

update_file_content

Update file content by specifying row numbers and new text. Optionally replace a substring within a row instead of the whole row.

Instructions

Update content at specific row(s) in a file

Args:
    path: Path to the file
    content: New content to place at the specified row(s)
    row: Row number to update (0-based, optional)
    rows: List of row numbers to update (0-based, optional)
    substring: If provided, only replace this substring within the specified row(s), not the entire row

Returns:
    Operation result information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
contentYes
rowNo
rowsNo
substringNo
Behavior4/5

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

The description discloses key behavioral traits: it updates specific rows, supports both single row and multiple rows, and allows substring replacement within a row. Since no annotations are provided, the description carries the full burden, and it does so adequately. However, it does not mention whether the tool is destructive or what happens if rows are out of range.

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?

The description is well-structured with clear parameter documentation. However, it is slightly verbose with the 'Args:' section. Could be more concise by integrating parameter info into a single paragraph, but still efficient for an AI agent.

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?

The description covers all parameters and explains row-level update behavior. The return value is vaguely described as 'Operation result information', but since there is no output schema, it would benefit from more detail (e.g., success message or updated row count). Overall adequate for a moderate complexity tool.

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 description adds significant meaning beyond the schema: it explains that row is 0-based and optional, rows is a list of row numbers, and substring only replaces a portion of the row content. This fully compensates for the 0% schema description coverage.

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 it updates content at specific row(s) in a file, using a specific verb ('Update') and resource ('content in a file'). It distinguishes from siblings like write_file (which writes entire file) and insert_file_content/delete_file_content by focusing on row-level modification with optional substring replacement.

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?

The description provides clear context for when to use this tool (to update specific rows in a file) but does not explicitly mention when not to use it or suggest alternatives (e.g., using write_file for whole-file replacement or edit_file if available). The substring parameter hint is helpful.

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/GongRzhe/terminal-controller-mcp'

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