Tools Reference

Comprehensive reference of all available MCP-compatible tools

This reference guide documents all available MCP-compatible tools in the gomcptest project, their parameters, and response formats.

Bash

Executes bash commands in a persistent shell session.

Parameters

ParameterTypeRequiredDescription
commandstringYesThe command to execute
timeoutnumberNoTimeout in milliseconds (max 600000)

Response

The tool returns the command output as a string.

Banned Commands

For security reasons, the following commands are banned: alias, curl, curlie, wget, axel, aria2c, nc, telnet, lynx, w3m, links, httpie, xh, http-prompt, chrome, firefox, safari

Edit

Modifies file content by replacing specified text.

Parameters

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path to the file to modify
old_stringstringYesText to replace
new_stringstringYesReplacement text

Response

Confirmation message with the updated content.

GlobTool

Finds files matching glob patterns with metadata.

Parameters

ParameterTypeRequiredDescription
patternstringYesGlob pattern to match files against
pathstringNoDirectory to search in (default: current directory)
excludestringNoGlob pattern to exclude from results
limitnumberNoMaximum number of results to return
absolutebooleanNoReturn absolute paths instead of relative

Response

A list of matching files with metadata including path, size, modification time, and permissions.

GrepTool

Searches file contents using regular expressions.

Parameters

ParameterTypeRequiredDescription
patternstringYesRegular expression pattern to search for
pathstringNoDirectory to search in (default: current directory)
includestringNoFile pattern to include in the search

Response

A list of matches with file paths, line numbers, and matched content.

LS

Lists files and directories in a given path.

Parameters

ParameterTypeRequiredDescription
pathstringYesAbsolute path to the directory to list
ignorearrayNoList of glob patterns to ignore

Response

A list of files and directories with metadata.

Replace

Completely replaces a file’s contents.

Parameters

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path to the file to write
contentstringYesContent to write to the file

Response

Confirmation message with the content written.

View

Reads file contents with optional line range.

Parameters

ParameterTypeRequiredDescription
file_pathstringYesAbsolute path to the file to read
offsetnumberNoLine number to start reading from
limitnumberNoNumber of lines to read

Response

The file content with line numbers in cat -n format.

dispatch_agent

Launches a new agent with access to specific tools.

Parameters

ParameterTypeRequiredDescription
promptstringYesThe task for the agent to perform

Response

The result of the agent’s task execution.

Tool Response Format

Most tools return JSON responses with the following structure:

{
  "result": "...", // String result or
  "results": [...], // Array of results
  "error": "..." // Error message if applicable
}

Error Handling

All tools follow a consistent error reporting format:

{
  "error": "Error message",
  "code": "ERROR_CODE"
}

Common error codes include:

  • INVALID_PARAMS: Parameters are missing or invalid
  • EXECUTION_ERROR: Error executing the requested operation
  • PERMISSION_DENIED: Permission issues
  • TIMEOUT: Operation timed out

Dernière modification 18.03.2025: ok (fd154af)