Skip to main content
Glama

service_inspect

Read-only

Retrieve a Docker swarm service's desired-state spec and rollout status by ID or name to inspect configuration and update progress.

Instructions

Get a swarm service by id or name.

Must run against a swarm manager. Returns the desired-state spec and rollout status - for the actually-running tasks use service_ps, or the service-tasks://{id_or_name} resource for a computed rollout summary.

Args: insert_defaults: Merge default values into the output

Returns: dict: The full service document ({"ID", "Version", "Spec", "Endpoint", ...}; "UpdateStatus" during a rolling update)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
id_or_nameYes
insert_defaultsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.0.0

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds the swarm-manager requirement and clarifies that the return doc contains desired-state spec while actual task status is elsewhere, but does not disclose rate limits, pagination, or other behavioral nuances, which are secondary for a read-only inspect.

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 description is moderately long but every part earns its place: task, precondition, differentiation, parameter semantics, and return shape. It is front-loaded with the primary purpose and alternative. A minor reduction in the final return list could tighten it, but no extraneous content.

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

Completeness4/5

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

Given the low schema coverage and no output schema, the description provides enough context: a clear return type, key fields, and update-status note. It also covers the operational requirement (swarm manager). The only omitted details are error conditions or authorization requirements, which are unnecessary for a read-only inspect.

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 description coverage is 0%, so the description must carry parameter semantics. It does: the target is 'by id or name' and insert_defaults is explained as 'Merge default values into the output'. This fully compensates for the schema lacking descriptions, though id_or_name's type is implicit.

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 'Get a swarm service by id or name', naming a specific verb and resource. It also explicitly differentiates from sibling service_ps by clarifying that it returns desired-state spec and rollout status, not actual running tasks, so an agent can select it correctly.

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?

It states a critical precondition ('Must run against a swarm manager') and explicitly points to service_ps as the alternative for actually-running tasks, plus a computed rollout summary resource. It lacks a comprehensive 'when not to use' list, but the key disambiguation from service_ps is explicit.

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