Terminal Controller for MCP
The Terminal Controller for MCP server enables secure terminal interactions and file system operations through a standardized interface.
Execute terminal commands: Run commands with timeout controls and capture comprehensive output (stdout, stderr, and execution status).
Manage directories: Get current directory, change working directories, and list directory contents with intuitive formatting.
Track command history: View and manage recent command executions.
Perform file operations: Read (with optional JSON parsing), write, append, insert, update, and delete file content with row-level precision and substring handling.
Security measures: Implements safeguards like timeout controls, command blacklisting, and proper error handling to prevent misuse.
Provides information on the configuration path for Claude Desktop on macOS operating system
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Terminal Controller for MCPlist files in my current directory"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Terminal Controller for MCP
A Model Context Protocol (MCP) server that enables secure terminal command execution, directory navigation, and file system operations through a standardized interface.
Features
Command Execution: Run terminal commands with timeout controls and comprehensive output capture
Directory Management: Navigate and list directory contents with intuitive formatting
Security Measures: Built-in safeguards against dangerous commands and operations
Command History: Track and display recent command executions
Cross-Platform Support: Works on both Windows and UNIX-based systems
File Operations: Read, write, update, insert, and delete file content with row-level precision
Related MCP server: MCP Server
Installation
Installing via Smithery
To install Terminal Controller for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @GongRzhe/terminal-controller-mcp --client claudePrerequisites
Python 3.11+
An MCP-compatible client (such as Claude Desktop)
UV/UVX installed (optional, for UVX method)
Method 1: PyPI Installation (Recommended)
Install the package directly from PyPI:
pip install terminal-controllerOr if you prefer to use UV:
uv pip install terminal-controllerMethod 2: From Source
If you prefer to install from source:
Clone this repository:
git clone https://github.com/GongRzhe/terminal-controller-mcp.git cd terminal-controller-mcpRun the setup script:
python setup_mcp.py
Client Configuration
Claude Desktop
There are two ways to configure Claude Desktop to use Terminal Controller:
Option 1: Using UVX (Recommended)
Add this to your Claude Desktop configuration file:
"terminal-controller": {
"command": "uvx",
"args": ["terminal_controller"]
}Option 2: Using Python Directly
"terminal-controller": {
"command": "python",
"args": ["-m", "terminal_controller"]
}The configuration path varies by operating system:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Cursor
For Cursor, use similar configuration settings as Claude Desktop.
Other MCP Clients
For other clients, refer to their documentation on how to configure external MCP servers.
Usage
Once configured, you can use natural language to interact with your terminal through your MCP client:
"Run the command
ls -lain the current directory""Navigate to my Documents folder"
"Show me the contents of my Downloads directory"
"Show me my recent command history"
"Read the content of config.json"
"Update line 5 in my script.py file with 'print("Hello World")'"
"Delete lines 10-15 from the log file"
"Insert a new line at the beginning of my text file"
API Reference
Terminal Controller exposes the following MCP tools:
execute_command
Execute a terminal command and return its results.
Parameters:
command: The command line command to executetimeout: Command timeout in seconds (default: 30)
Returns:
Output of the command execution, including stdout, stderr, and execution status
get_command_history
Get recent command execution history.
Parameters:
count: Number of recent commands to return (default: 10)
Returns:
Formatted command history record
get_current_directory
Get the current working directory.
Returns:
Path of current working directory
change_directory
Change the current working directory.
Parameters:
path: Directory path to switch to
Returns:
Operation result information
list_directory
List files and subdirectories in the specified directory.
Parameters:
path: Directory path to list contents (default: current directory)
Returns:
List of directory contents, formatted with icons for directories and files
write_file
Write content to a file with overwrite or append options.
Parameters:
path: Path to the filecontent: Content to writemode: Write mode ('overwrite' or 'append', default: 'overwrite')
Returns:
Operation result information including verification of successful write
read_file
Read content from a file with optional row selection.
Parameters:
path: Path to the filestart_row: Starting row to read from (0-based, optional)end_row: Ending row to read to (0-based, inclusive, optional)
Returns:
File content or selected lines
insert_file_content
Insert content at specific row(s) in a file.
Parameters:
path: Path to the filecontent: Content to insertrow: Row number to insert at (0-based, optional)rows: List of row numbers to insert at (0-based, optional)
Returns:
Operation result information
delete_file_content
Delete content at specific row(s) from a file.
Parameters:
path: Path to the filerow: Row number to delete (0-based, optional)rows: List of row numbers to delete (0-based, optional)
Returns:
Operation result information
update_file_content
Update content at specific row(s) in a file.
Parameters:
path: Path to the filecontent: 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)
Returns:
Operation result information
Security Considerations
Terminal Controller implements several security measures:
Timeout controls to prevent long-running commands
Blacklisting of dangerous commands (rm -rf /, format, mkfs)
Proper error handling and isolation of command execution
Access only to the commands and directories specifically granted
Limitations
Only commands that complete within the timeout period will return results
By default, the server has access to the same file system permissions as the user running it
Some interactive commands may not work as expected due to the non-interactive nature of the terminal interface
Troubleshooting
If you encounter issues:
Check that your Python version is 3.11 or higher
Verify that your Claude Desktop configuration is correct
Try running the terminal controller directly to check for errors:
python -m terminal_controllerFor UVX-related issues, try:
uvx terminal_controllerReview your MCP client's logs for connection errors
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT
Available Tools
10 toolschange_directoryB
Change current working directory
Args:
path: Directory path to switch to
Returns:
Operation result information
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It only states the basic action without mentioning persistence, side effects, or any other behavioral aspects, which is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, with no extraneous words. It front-loads the purpose and parameter in a clear format. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity and lack of output schema, the description omits crucial context like whether the change is persistent, impacts subsequent commands, or what errors occur. The agent needs more to use it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, and the description adds meaning to the 'path' parameter by calling it 'Directory path to switch to'. However, it does not elaborate on format, validity, or error conditions, so it only marginally compensates for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Change' and resource 'current working directory', clearly distinguishing it from sibling tools like get_current_directory or list_directory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives. There is no mention of prerequisites or context, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
delete_file_contentB
Delete content at specific row(s) from a file
Args:
path: Path to the file
row: Row number to delete (0-based, optional)
rows: List of row numbers to delete (0-based, optional)
substring: If provided, only delete this substring within the specified row(s), not the entire row (optional)
Returns:
Operation result information
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| row | No | ||
| rows | No | ||
| substring | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavior. It states it deletes content but fails to mention consequences such as whether deletion is permanent, what happens if both row and rows are specified, or required permissions. This is insufficient for a destructive operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is fairly direct but redundantly repeats the main action in the Args section. It could be more concise by eliminating the title line and integrating parameter descriptions more efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description covers parameter meanings but omits critical behavioral details like error handling, return value format, and interaction between row, rows, and substring. It is not complete enough for an agent to confidently invoke the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With schema coverage at 0%, the description compensates well by explaining each parameter: path is required, row is 0-based, rows is a list, and substring can delete part of a row. This adds meaning beyond the schema's type and default fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states 'Delete content at specific row(s) from a file', providing a specific verb and resource. It effectively distinguishes itself from sibling tools like update_file_content or insert_file_content by focusing on deletion.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives, or when to use row vs rows vs substring. The description implies deletion but does not provide context for choosing among parameters or other file manipulation tools.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
execute_commandC
Execute terminal command and return results
Args:
command: Command line command to execute
timeout: Command timeout in seconds, default is 30 seconds
Returns:
Output of the command execution
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | ||
| timeout | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description bears full burden for behavioral disclosure. It mentions returning output but omits critical traits like execution directory, security restrictions, error handling, or whether multi-line commands are supported. This leaves significant ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Description is extremely concise with two sentences for the summary and structured Args/Returns. No redundant information, and the purpose is front-loaded. It earns its length efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool lacking annotations and output schema, the description omits important context: safety warnings, return format details, error behavior, and interaction with the workspace. This inadequately equips an agent to use it reliably.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no parameter descriptions in schema). The description compensates by adding 'Command line command to execute' for command and 'Command timeout in seconds, default is 30 seconds' for timeout. These provide basic meaning beyond name and type but are not detailed, e.g., no format or constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states it executes a terminal command and returns results. The verb 'execute' and resource 'terminal command' are specific, distinguishing it from file operations like read_file or change_directory. However, it lacks clarity on scope or safety limitations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use vs. alternatives. The description does not mention precautions, such as for destructive commands or when to prefer other tools like list_directory. This omission leaves the agent without context to choose appropriately.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_command_historyB
Get recent command execution history
Args:
count: Number of recent commands to return
Returns:
Formatted command history record
| Name | Required | Description | Default |
|---|---|---|---|
| count | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite no annotations, the description only vaguely mentions 'recent' and returns 'Formatted command history record', omitting details on ordering, session scope, or side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is brief and front-loaded with the purpose, but the structure could be improved by placing the parameter description inline rather than in an unstructured list.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one optional parameter and no output schema, the description covers the basics but lacks details on default behavior, ordering, and format of the history.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaning to the 'count' parameter by stating it controls the number of recent commands returned, compensating for the 0% schema description coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (Get) and resource (recent command execution history), which distinguishes it from sibling tools that focus on file and directory operations.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives, nor are there any exclusions or prerequisites mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_current_directoryA
Get current working directory
Returns:
Path of current working directory
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided. Description is minimal but adequately conveys the read-only, safe nature of the operation. Does not mention error conditions or dependencies, but acceptable for a trivial tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Extremely concise: two lines, no wasted words. Front-loaded with the key purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Adequate for a parameterless tool without output schema. States purpose and return value. Could mention error cases, but not critical.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters in schema (100% coverage). Description adds value by explicitly stating return value, which is not part of input schema. Baseline for 0 params is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states action ('Get current working directory') and return value ('Path of current working directory'). Distinct from siblings like change_directory and list_directory.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit usage guidance; does not specify when to use this tool over alternatives. For a simple getter, context is somewhat implied but could be improved.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
insert_file_contentB
Insert content at specific row(s) in a file
Args:
path: Path to the file
content: Content to insert (string or JSON object)
row: Row number to insert at (0-based, optional)
rows: List of row numbers to insert at (0-based, optional)
Returns:
Operation result information
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| row | No | ||
| rows | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions 0-based row numbering and that content can be a string or JSON object, but does not explain what happens if rows exceed file length, whether content is inserted as new lines, or if existing content is shifted. Critical safety information is missing.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a docstring with Args and Returns sections. It is fairly concise but the Returns line is vague ('Operation result information'). Some content, like the repetition of 0-based row information, could be condensed.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 4 parameters, no output schema, and no annotations, the description lacks behavioral details (e.g., error handling, row insertion behavior) and return value structure. It provides basic parameter descriptions but is incomplete for safe and effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0%, so the description must compensate. It adds context: 'Content to insert (string or JSON object)' and specifies 0-based row numbering. However, it does not clarify the relationship between 'row' and 'rows' (e.g., exclusive or cumulative) nor specify the type of items in the 'rows' array beyond the schema's generic 'items': {}.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states 'Insert content at specific row(s) in a file', which is a specific verb+resource combination. It clearly distinguishes from sibling tools like write_file, update_file_content, and delete_file_content by focusing on insertion at specific rows.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. The description lists arguments but does not clarify when insert is preferred over write or update. This leaves the agent uncertain about tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_directoryA
List files and subdirectories in the specified directory
Args:
path: Directory path to list contents, default is current directory
Returns:
List of directory contents
| Name | Required | Description | Default |
|---|---|---|---|
| path | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations present, so description carries full burden. It does not disclose whether listing is recursive, what format the output uses (names only? paths?), or error handling. This is insufficient for a tool with no annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences plus structured Args/Returns. Front-loaded with purpose. Returns is vague but overall efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple tool with one param and no output schema, the description covers basic usage. However, it omits details like hidden files, sorting, or error cases, which are relevant for completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description adds meaning: clarifies path is a directory path, default is current directory. This compensates for the schema gap.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states it lists files and subdirectories, which is a specific verb and resource. It distinguishes itself from sibling tools like read_file and write_file.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use to list directory contents. No explicit when-not-to-use or alternatives provided, but the context is straightforward.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_fileA
Read content from a file with optional row selection
Args:
path: Path to the file
start_row: Starting row to read from (0-based, optional)
end_row: Ending row to read to (0-based, inclusive, optional)
as_json: If True, attempt to parse file content as JSON (optional)
Returns:
File content or selected lines, optionally parsed as JSON
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| start_row | No | ||
| end_row | No | ||
| as_json | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Discloses read operation and JSON parsing but lacks details on large file handling, encoding, or permission requirements. Adequate but not thorough.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Well-structured with summary, Args, and Returns. Some redundancy with schema (e.g., defaults restated), but overall concise and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Complete for basic use: explains all parameters and return values. Missing error handling or edge cases (e.g., file not found, binary files), but given no output schema and no annotations, it covers core functionality well.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% (no descriptions), but the description explains each parameter in Args section (path, start_row, end_row, as_json) with context like 0-based indexing and optionality. Adds value beyond schema titles.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states 'Read content from a file with optional row selection,' which is a specific verb+resource. Distinguishes from sibling tools like write_file and update_file_content as a read-only operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Implies usage for reading file content but provides no explicit guidance on when to use this tool versus alternatives like list_directory or get_current_directory. Missing prerequisites or error scenarios.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
update_file_contentA
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| row | No | ||
| rows | No | ||
| substring | No |
TDQS
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.
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.
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.
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.
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.
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.
write_fileA
Write content to a file
Args:
path: Path to the file
content: Content to write (string or JSON object)
mode: Write mode ('overwrite' or 'append')
Returns:
Operation result information
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| content | Yes | ||
| mode | No | overwrite |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must disclose behaviors but only says 'Write content to a file' and mentions modes. It fails to address what happens if the file doesn't exist, whether it truncates, encoding, or user permissions. This lack of context for a mutation tool is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise, using a docstring format with clear sections. It front-loads the one-line summary, and every part adds value without repetition or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 parameters and no output schema, the description covers the basics but lacks details on error conditions, file creation behavior, and return value specifics. It is adequate but not fully complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description provides necessary semantics for parameters: 'Path to the file', 'Content to write', and 'Write mode'. It adds value over bare titles, though could clarify content format and path constraints.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Write content to a file' clearly states the action and resource, distinguishing it from siblings like read_file or delete_file_content. The docstring provides specific parameter explanations, confirming the tool's purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
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 vs alternatives like update_file_content or insert_file_content. The description does not explain the difference between overwrite and append modes or when each is appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
10 tool updates
- First observed
change_directory - First observed
delete_file_content - First observed
execute_command - First observed
get_command_history - First observed
get_current_directory - First observed
insert_file_content - First observed
list_directory - First observed
read_file - First observed
update_file_content - First observed
write_file
TDQS
Each tool has a clearly distinct purpose: directory change/get/list, file read/write/insert/update/delete, command execution, and history retrieval. No overlapping functionality.
All tools follow a consistent verb_noun pattern in snake_case, using imperative verbs like change, delete, execute, get, insert, list, read, update, write. The naming is predictable and uniform.
With 10 tools, the set is well-scoped for a terminal controller, providing essential file and directory operations plus command execution without oversaturation.
The surface covers core file CRUD (create via write, read, update, delete) and directory navigation, plus command execution and history. Missing directory creation/deletion and file copy/move, but these are minor gaps for typical agent workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server allowing LLMs to execute commands on Windows terminals, including local shells (cmd, PowerShell, bash) and remote SSH connections with a 3-level security model.MIT
- AlicenseNot gradedqualityDmaintenanceA modular MCP server providing file operations, web search, URL scraping, and sandboxed command execution for LLM interactions.1MIT
- AlicenseBqualityAmaintenanceA secure MCP server for shell operations, terminal management, and process control, enabling AI assistants to safely execute commands and manage interactive sessions.132046MIT
- AlicenseNot gradedqualityAmaintenanceA local MCP server that enables LLMs to execute shell commands on remote hosts over SSH with multiple authentication methods.353MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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