Run command on a device
mesh_run_commandRuns shell commands on a MeshCentral-managed device through its agent and returns the output; commands must be enabled and may execute with root/SYSTEM privileges.
Instructions
Run a shell command through the MeshCentral agent and return its output. Needs MESH_MCP_ALLOW_COMMANDS=1. The agent usually runs as root/SYSTEM, so treat this as full control of the machine.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"device": "<device>",
"command": "<command>"
},
"name": "mesh_run_command"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device | Yes | ||
| command | Yes | ||
| powershell | No | Windows only: run in PowerShell | |
| run_as_user | No | Try to run as the logged-in user | |
| timeout_seconds | No |