Skip to main content
Glama

Install the ctrlPi API on a device

pi_ctrlpi_install
Destructive

Installs or updates the ctrlPi API agent on a Raspberry Pi, configures its service, preserves existing config, and returns sudo commands if passwordless sudo is unavailable.

Instructions

Install or update pi-gpio-api (the ctrlPi API agent) in ~/pi-gpio-api with its install.sh. On a first install, name and api_key are written to ~/pi-gpio-api/config.json (defaults: the device hostname and your-secret-key, the installer's own); an existing config.json is kept and they are ignored. A result with the default key carries a warning. On a Raspberry Pi with passwordless sudo the pi-gpio-api service is then created and started, or restarted; otherwise service is needs_sudo and output holds the sudo commands to run. Can take several minutes (the full package installs FastAPI). Ask the user first and pass confirmed: true.

Input Schema

NameRequiredDescriptionDefault
nameNoAgent name for a first install. Default: the device hostname.
api_keyNoAgent API key for a first install. Default: your-secret-key (public, so change it).
packageNolite: the dependency-free server (recommended). full: FastAPI with /docs pages.lite
confirmedYesMust be true after the user explicitly confirms the install.
device_idYesIP address, hostname, MAC address, or device identifier of the target Raspberry Pi / SSH device.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the destructiveHint annotation: it discloses that an existing config.json is preserved and name/api_key are then ignored, that a default key produces a warning, that a service is created/started/restarted, that a needs_sudo result returns commands to run, and that the call can take several minutes. This is exactly the mutation-side context an agent needs before firing a destructive write.

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?

Dense and front-loaded: identity and location of the install come first, then config semantics, then service behavior, then the confirmation requirement. Every sentence carries information, though the run of clauses in the middle sentence makes it slightly heavy to parse.

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

Completeness5/5

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

With no output schema, the description still explains what results look like (warning on default key, service: needs_sudo with sudo commands in output) and covers duration, confirmation, and config idempotency. Nothing an agent needs to call this safely appears to be missing.

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

Parameters4/5

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

Schema coverage is already 100%, so the baseline is 3, but the description adds real semantics the schema cannot express: name and api_key apply only on a first install and are otherwise ignored, and package=full pulls in FastAPI and lengthens the run. That conditional parameter behavior is the useful increment.

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

Purpose5/5

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

States a specific verb and resource ('Install or update pi-gpio-api (the ctrlPi API agent) in ~/pi-gpio-api with its install.sh'), plus the target artifact. This is clearly distinguishable from command-execution siblings like pi_command_run because it names the exact package and install script it drives.

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

Usage Guidelines4/5

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

Gives explicit preconditions ('Ask the user first and pass confirmed: true') and explains the branch condition for service setup (passwordless sudo vs. otherwise). It doesn't explicitly contrast with pi_command_run for ad-hoc installs, so it falls just short of the top score.

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