Skip to main content
Glama

openwisp_execute_device_command

Execute reboot or custom shell commands on OpenWISP-managed devices to remotely control network hardware through the REST API.

Instructions

[Category: Devices & Controller] Execute a command on a device, such as reboot or a custom shell command. (HTTP POST /api/v1/controller/device/{device_id}/command/)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
typeYesCommand type
commandNoCustom command when type is custom
device_idYesDevice UUID or ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations at all, the description carries the full behavioral burden and falls short. It implies a mutating operation via 'Execute' and the POST route, but does not state permission requirements, that a reboot is disruptive/irreversible for the target, whether the command is queued asynchronously and results retrieved later, or what the response contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single front-loaded sentence with the action first, followed by the helpful category tag and endpoint. No filler, though the bracket tag and raw route are boilerplate rather than agent-facing value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating, potentially disruptive tool with zero annotations and no output schema, the description omits the essentials: safety/permission expectations, async command delivery, and any notion of what happens to the device or how the result is fetched.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the enum on 'type' documents its two values, so the schema already does the heavy lifting. The description's only added nuance is that 'custom' corresponds to a shell command, which is marginal over the field descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Execute a command on a device') and illustrates scope with concrete examples (reboot, custom shell command), plus the underlying HTTP route. It is clearly separable from sibling reads like openwisp_list_device_commands and openwisp_get_device_command, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use, when-not-to-use, or alternative routing guidance. The examples imply that 'custom' is for shell commands, but nothing tells the agent whether to route to this tool versus the listing/getting counterparts or when a reboot is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools