348 lines
10 KiB
JSON
348 lines
10 KiB
JSON
{
|
|
"version": "1.0",
|
|
"tools": [
|
|
{
|
|
"name": "read_file",
|
|
"description": "Read the contents of a file from the filesystem.",
|
|
"category": "file",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_path": {
|
|
"type": "string",
|
|
"description": "The path to the file to read"
|
|
},
|
|
"encoding": {
|
|
"type": "string",
|
|
"description": "File encoding (default: utf-8)",
|
|
"default": "utf-8"
|
|
}
|
|
},
|
|
"required": ["file_path"]
|
|
}
|
|
},
|
|
{
|
|
"name": "write_file",
|
|
"description": "Write content to a file. Creates the file if it doesn't exist, overwrites if it does.",
|
|
"category": "file",
|
|
"security_level": "review",
|
|
"require_approval": true,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_path": {
|
|
"type": "string",
|
|
"description": "The path to the file to write"
|
|
},
|
|
"content": {
|
|
"type": "string",
|
|
"description": "The content to write to the file"
|
|
},
|
|
"encoding": {
|
|
"type": "string",
|
|
"description": "File encoding (default: utf-8)",
|
|
"default": "utf-8"
|
|
}
|
|
},
|
|
"required": ["file_path", "content"]
|
|
}
|
|
},
|
|
{
|
|
"name": "list_dir",
|
|
"description": "List the contents of a directory.",
|
|
"category": "file",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"dir_path": {
|
|
"type": "string",
|
|
"description": "The path to the directory to list (default: current directory)",
|
|
"default": "."
|
|
}
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "delete_file",
|
|
"description": "Delete a file or directory.",
|
|
"category": "file",
|
|
"security_level": "danger",
|
|
"require_approval": true,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"file_path": {
|
|
"type": "string",
|
|
"description": "The path to the file or directory to delete"
|
|
}
|
|
},
|
|
"required": ["file_path"]
|
|
}
|
|
},
|
|
{
|
|
"name": "search_files",
|
|
"description": "Search for files by name pattern or content.",
|
|
"category": "file",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"directory": {
|
|
"type": "string",
|
|
"description": "The directory to search in"
|
|
},
|
|
"pattern": {
|
|
"type": "string",
|
|
"description": "Glob pattern for file names (e.g., '*.py', '*.txt')",
|
|
"default": "*"
|
|
},
|
|
"content_pattern": {
|
|
"type": "string",
|
|
"description": "Optional: search for files containing this text in their content"
|
|
},
|
|
"file_only": {
|
|
"type": "boolean",
|
|
"description": "Only return files, not directories",
|
|
"default": true
|
|
}
|
|
},
|
|
"required": ["directory"]
|
|
}
|
|
},
|
|
{
|
|
"name": "execute_python",
|
|
"description": "Execute Python code in a sandboxed environment. Use this for Python programming tasks, calculations, and data processing.",
|
|
"category": "executor",
|
|
"security_level": "review",
|
|
"require_approval": true,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "The Python code to execute"
|
|
},
|
|
"timeout": {
|
|
"type": "integer",
|
|
"description": "Execution timeout in seconds (default: 30, max: 60)",
|
|
"default": 30
|
|
}
|
|
},
|
|
"required": ["code"]
|
|
}
|
|
},
|
|
{
|
|
"name": "execute_javascript",
|
|
"description": "Execute JavaScript code in a sandboxed environment. Use this for JavaScript programming tasks.",
|
|
"category": "executor",
|
|
"security_level": "review",
|
|
"require_approval": true,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "string",
|
|
"description": "The JavaScript code to execute"
|
|
},
|
|
"timeout": {
|
|
"type": "integer",
|
|
"description": "Execution timeout in seconds (default: 30)",
|
|
"default": 30
|
|
}
|
|
},
|
|
"required": ["code"]
|
|
}
|
|
},
|
|
{
|
|
"name": "execute_bash",
|
|
"description": "Execute a bash command in a sandboxed environment. Use this for shell operations, file management, and system commands.",
|
|
"category": "executor",
|
|
"security_level": "danger",
|
|
"require_approval": true,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"type": "string",
|
|
"description": "The bash command to execute"
|
|
},
|
|
"timeout": {
|
|
"type": "integer",
|
|
"description": "Execution timeout in seconds (default: 30)",
|
|
"default": 30
|
|
}
|
|
},
|
|
"required": ["command"]
|
|
}
|
|
},
|
|
{
|
|
"name": "web_fetch",
|
|
"description": "Fetch content from a web URL. Supports GET, POST methods and can return JSON or text content.",
|
|
"category": "web",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "The URL to fetch"
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"description": "HTTP method (GET, POST)",
|
|
"default": "GET"
|
|
},
|
|
"params": {
|
|
"type": "object",
|
|
"description": "Query parameters"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"description": "Request headers"
|
|
},
|
|
"body": {
|
|
"type": "string",
|
|
"description": "Request body (for POST)"
|
|
},
|
|
"timeout": {
|
|
"type": "integer",
|
|
"description": "Request timeout in seconds",
|
|
"default": 30
|
|
}
|
|
},
|
|
"required": ["url"]
|
|
}
|
|
},
|
|
{
|
|
"name": "web_search",
|
|
"description": "Search the web for information. Use this when you need to find current information or facts.",
|
|
"category": "web",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"query": {
|
|
"type": "string",
|
|
"description": "The search query"
|
|
},
|
|
"max_results": {
|
|
"type": "integer",
|
|
"description": "Maximum number of results to return",
|
|
"default": 5
|
|
}
|
|
},
|
|
"required": ["query"]
|
|
}
|
|
},
|
|
{
|
|
"name": "http_request",
|
|
"description": "Make HTTP requests to APIs. Supports GET, POST, PUT, DELETE methods with JSON data.",
|
|
"category": "http",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"url": {
|
|
"type": "string",
|
|
"description": "The URL to request"
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"description": "HTTP method (GET, POST, PUT, DELETE, PATCH)",
|
|
"default": "GET"
|
|
},
|
|
"params": {
|
|
"type": "object",
|
|
"description": "Query parameters for GET requests"
|
|
},
|
|
"headers": {
|
|
"type": "object",
|
|
"description": "Request headers"
|
|
},
|
|
"json_data": {
|
|
"type": "object",
|
|
"description": "JSON body for POST/PUT requests"
|
|
},
|
|
"timeout": {
|
|
"type": "integer",
|
|
"description": "Request timeout in seconds",
|
|
"default": 30
|
|
}
|
|
},
|
|
"required": ["url"]
|
|
}
|
|
},
|
|
{
|
|
"name": "send_notification",
|
|
"description": "Send notifications via email, webhook, dingtalk, or slack.",
|
|
"category": "notification",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"type": {
|
|
"type": "string",
|
|
"description": "Notification type: email, webhook, dingtalk, slack",
|
|
"enum": ["email", "webhook", "dingtalk", "slack"]
|
|
},
|
|
"message": {
|
|
"type": "string",
|
|
"description": "The notification message"
|
|
},
|
|
"to": {
|
|
"type": "string",
|
|
"description": "For email: recipient email address"
|
|
},
|
|
"subject": {
|
|
"type": "string",
|
|
"description": "For email: email subject"
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"description": "For webhook: webhook URL"
|
|
},
|
|
"data": {
|
|
"type": "object",
|
|
"description": "For webhook: JSON data to send"
|
|
},
|
|
"webhook": {
|
|
"type": "string",
|
|
"description": "Custom webhook URL for dingtalk/slack"
|
|
},
|
|
"channel": {
|
|
"type": "string",
|
|
"description": "For slack: channel name"
|
|
}
|
|
},
|
|
"required": ["type", "message"]
|
|
}
|
|
},
|
|
{
|
|
"name": "get_current_time",
|
|
"description": "Get the current date and time. Useful for timestamps or scheduling.",
|
|
"category": "system",
|
|
"security_level": "safe",
|
|
"require_approval": false,
|
|
"parameters": {
|
|
"type": "object",
|
|
"properties": {
|
|
"timezone": {
|
|
"type": "string",
|
|
"description": "Optional timezone (e.g., 'UTC', 'Asia/Shanghai')",
|
|
"default": "Local"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|