Skip to main content
Glama

Diagnose spm

spm_doctor
Read-only

Diagnose whether spm can manage services by checking manager reachability, unit directory, log access, login persistence, and executable; use before first service or when create/start/list fails.

Instructions

Check that spm can manage services in the chosen scope: whether the service manager is reachable and recent enough, the unit directory, log access, login persistence and the spm executable; the exact checks depend on the platform. Use it when a create, start or list call fails unexpectedly, or before the first service on a new machine; use spm_get_logs for problems inside one service. Returns one line per check marked ok, info, warn or fail, with details on what is wrong. Acts on the current user's services unless system is true; machine-wide services need root on Linux and macOS or an Administrator shell on Windows, so only use system when the user asks for it.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "spm_doctor"
  }
}

Input Schema

NameRequiredDescriptionDefault
systemNoManage machine-wide services instead of the current user's. Requires root or Administrator; leave false unless the user asks for system scope.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / system / description
      Previous value: -"Manage machine-wide services instead of current-user services."New value: +"Manage machine-wide services instead of the current user's. Requires root or Administrator; leave false unless the user asks for system scope."
  2. First observedv0.3.9

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the readOnly/non-destructive/closed annotations, the description discloses that the set of checks varies by platform, the privilege requirements for system scope on each OS, and the exact output format (one line per check marked ok, info, warn or fail). This is substantial behavioral context an agent cannot get from the annotations.

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?

The paragraph is front-loaded with the purpose, then usage, then return format, then scope caveats, and no sentence is filler. It is dense and long-sentenced (semicolon chains), which slightly reduces scannability but not substance.

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 only one parameter, no output schema, and full schema coverage, the description still covers the missing pieces an agent needs: what is checked, when to call it, what the output looks like, and the privilege implications of system scope. Nothing material is left out.

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 coverage is 100% and the single 'system' parameter already documents its default, privilege requirement, and the 'leave false unless the user asks' rule. The description reinforces the same scope semantics but adds no new syntax or format information, so the baseline 3 applies.

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?

The description states a specific verb and resource ('Check that spm can manage services in the chosen scope') and then enumerates the concrete checks (service manager reachability/version, unit directory, log access, login persistence, spm executable). It explicitly distinguishes itself from spm_get_logs, so an agent can pick between them without opening a schema.

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

Usage Guidelines5/5

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

It gives explicit when-to-use conditions ('when a create, start or list call fails unexpectedly, or before the first service on a new machine') and names the alternative for a different problem class ('use spm_get_logs for problems inside one service'). It also adds an exclusion for system scope ('only use system when the user asks for it').

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