12 MCP Tools
Полный справочник инструментов FlowLink MCP
~8 мин чтения
Обзор
flowlink_execВыполнить команду на агенте
flowlink_readПрочитать файл с агента
flowlink_writeЗаписать файл на агент
flowlink_listСписок файлов/директорий
flowlink_sysinfoСистемная информация агента
flowlink_killЗавершить процесс на агенте
flowlink_deregisterОтключить и удалить агента
flowlink_config_updateОбновить конфигурацию агента
flowlink_policyПолучить/обновить политики агента
flowlink_approveОдобрить pending запрос
flowlink_denyОтклонить pending запрос
flowlink_sandbox_statusСтатус sandbox агента
flowlink_exec
Выполнить команду на агенте. Команда проходит через 7-уровневый анализ Shield.
Категория
agent
Scope
agents:write
Запрос
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "flowlink_exec",
"arguments": {
"agent_id": "my-server",
"command": "ls -la /var/log"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "total 48\ndrwxr-xr-x 2 root root 4096 Jan 15 10:30 .\ndrwxr-xr-x 12 root root 4096 Jan 15 09:00 ..\n-rw-r--r-- 1 root root 12345 Jan 15 10:30 app.log\n-rw-r--r-- 1 root root 6789 Jan 15 10:25 system.log"
}
],
"isError": false
}
}Ответ с ошибкой
{
"jsonrpc": "2.0",
"id": 1,
"error": {
"code": -32000,
"message": "Command blocked by Shield L4: Destructive command",
"data": {
"level": "L4",
"decision": "BLOCKED",
"reason": "Destructive command: recursive force delete"
}
}
}flowlink_read
Прочитать файл с агента. Поддерживаются файлы до 10MB.
Запрос
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "flowlink_read",
"arguments": {
"agent_id": "my-server",
"path": "/etc/hosts"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"content": [
{
"type": "text",
"text": "127.0.0.1 localhost\n192.168.1.100 web-server-01\n"
}
],
"isError": false
}
}Ответ с ошибкой
{
"jsonrpc": "2.0",
"id": 2,
"error": {
"code": -32001,
"message": "File not found: /etc/missing",
"data": {
"path": "/etc/missing",
"agent_id": "my-server"
}
}
}flowlink_write
Записать файл на агент. Создаёт директории если не существуют.
Запрос
{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "flowlink_write",
"arguments": {
"agent_id": "my-server",
"path": "/tmp/config.json",
"content": "{\"key\": \"value\"}"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"content": [
{
"type": "text",
"text": "File written successfully: /tmp/config.json (15 bytes)"
}
],
"isError": false
}
}flowlink_list
Список файлов и директорий. Поддерживает рекурсивное чтение.
Запрос
{
"jsonrpc": "2.0",
"id": 4,
"method": "tools/call",
"params": {
"name": "flowlink_list",
"arguments": {
"agent_id": "my-server",
"path": "/var/log",
"recursive": false
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"content": [
{
"type": "text",
"text": "drwxr-xr-x 2 root root 4096 Jan 15 10:30 .\ndrwxr-xr-x 12 root root 4096 Jan 15 09:00 ..\n-rw-r--r-- 1 root root 12345 Jan 15 10:30 app.log\n-rw-r--r-- 1 root root 6789 Jan 15 10:25 system.log"
}
],
"isError": false
}
}flowlink_sysinfo
Получить системную информацию агента: OS, CPU, memory, disk.
Запрос
{
"jsonrpc": "2.0",
"id": 5,
"method": "tools/call",
"params": {
"name": "flowlink_sysinfo",
"arguments": {
"agent_id": "my-server"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 5,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"hostname\": \"web-server-01\",\n \"os\": \"linux\",\n \"arch\": \"x86_64\",\n \"kernel\": \"5.15.0\",\n \"cpu_cores\": 4,\n \"memory_gb\": 16,\n \"disk_gb\": 500,\n \"uptime_hours\": 1234\n}"
}
],
"isError": false
}
}flowlink_kill
Завершить процесс на агенте по PID. Требует agents:admin scope.
Запрос
{
"jsonrpc": "2.0",
"id": 6,
"method": "tools/call",
"params": {
"name": "flowlink_kill",
"arguments": {
"agent_id": "my-server",
"pid": 1234,
"signal": 15
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"content": [
{
"type": "text",
"text": "Process 1234 terminated successfully (SIGTERM)"
}
],
"isError": false
}
}flowlink_deregister
Отключить и удалить агента из системы. Требует agents:admin scope.
Запрос
{
"jsonrpc": "2.0",
"id": 7,
"method": "tools/call",
"params": {
"name": "flowlink_deregister",
"arguments": {
"agent_id": "old-server"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 7,
"result": {
"content": [
{
"type": "text",
"text": "Agent old-server deregistered successfully"
}
],
"isError": false
}
}flowlink_config_update
Обновить конфигурацию агента в runtime. Изменения применяются немедленно.
Запрос
{
"jsonrpc": "2.0",
"id": 8,
"method": "tools/call",
"params": {
"name": "flowlink_config_update",
"arguments": {
"agent_id": "my-server",
"key": "approval_mode",
"value": "soft_ask"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 8,
"result": {
"content": [
{
"type": "text",
"text": "Config updated: approval_mode = soft_ask"
}
],
"isError": false
}
}flowlink_policy
Получить или обновить политики агента. Поддерживает actions: get, set, reload.
Запрос
{
"jsonrpc": "2.0",
"id": 9,
"method": "tools/call",
"params": {
"name": "flowlink_policy",
"arguments": {
"agent_id": "my-server",
"action": "get"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 9,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"policy_id\": \"pol_abc123\",\n \"rules\": [\n {\"pattern\": \"docker ps*\", \"type\": \"ALLOW\", \"priority\": 100}\n ]\n}"
}
],
"isError": false
}
}flowlink_approve
Одобрить pending запрос от агента. Используется для approval workflow.
Запрос
{
"jsonrpc": "2.0",
"id": 10,
"method": "tools/call",
"params": {
"name": "flowlink_approve",
"arguments": {
"agent_id": "my-server",
"request_id": "req_xyz789"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 10,
"result": {
"content": [
{
"type": "text",
"text": "Request req_xyz789 approved. Command executed successfully."
}
],
"isError": false
}
}flowlink_deny
Отклонить pending запрос от агента. Команда не будет выполнена.
Запрос
{
"jsonrpc": "2.0",
"id": 11,
"method": "tools/call",
"params": {
"name": "flowlink_deny",
"arguments": {
"agent_id": "my-server",
"request_id": "req_xyz789"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 11,
"result": {
"content": [
{
"type": "text",
"text": "Request req_xyz789 denied."
}
],
"isError": false
}
}flowlink_sandbox_status
Получить статус sandbox агента: активен, режим, ограничения.
Запрос
{
"jsonrpc": "2.0",
"id": 12,
"method": "tools/call",
"params": {
"name": "flowlink_sandbox_status",
"arguments": {
"agent_id": "my-server"
}
}
}Ответ
{
"jsonrpc": "2.0",
"id": 12,
"result": {
"content": [
{
"type": "text",
"text": "{\n \"enabled\": true,\n \"mode\": \"restricted\",\n \"allowed_commands\": [\"ls\", \"cat\", \"grep\"],\n \"max_execution_time\": 30\n}"
}
],
"isError": false
}
}