Skip to main content
Glama

restart_service

Restarts an Ambari service by stopping it, waiting for completion, then starting it to recover from issues or apply maintenance changes.

Instructions

Restarts a specific service in an Ambari cluster (stop then start).

[Tool Role]: Dedicated tool for automated restart of Ambari services, ensuring safe stop and start sequence.

[Core Functions]:

  • Stop the specified service and wait for completion

  • Start the service and wait for completion

  • Return clear success or error message for LLM automation

[Required Usage Scenarios]:

  • When users request to "restart" a service (e.g., "restart HDFS", "restart YARN")

  • When troubleshooting or recovering service issues

  • When maintenance or configuration changes require a restart

  • When users mention service restart, safe restart, or automated restart

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": {
      "service_name": "<service_name>"
    },
    "name": "restart_service"
  }
}

Input Schema

NameRequiredDescriptionDefault
service_nameYesName of the service to restart (e.g., "HDFS", "YARN")

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.8.2
    • addedInput schema / properties / service_name / description
      Added value: +"Name of the service to restart (e.g., \"HDFS\", \"YARN\")"
  2. Changed4 schema fields changedv3.7.5
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / service_name / title
      Removed value: -"Service Name"
    • removedOutput schema / properties / result / title
      Removed value: -"Result"
    • removedOutput schema / title
      Removed value: -"_WrappedResult"
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does disclose the key behavior: an ordered stop-then-start with waits for completion and a success/error return for automation. It omits operational risk context such as service downtime, permission requirements, or whether the restart is scheduled via request IDs, which keeps it from a 5.

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

Conciseness3/5

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

The opening sentence is front-loaded and useful, but the bracketed headers pad it and the final scenario line restates 'restart' three times ('service restart, safe restart, or automated restart'). Roughly a third of the text is redundant with earlier statements.

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?

For a one-parameter disruptive operation with an output schema present, the description covers the sequence, blocking wait, and error signaling an agent needs. The remaining gap is mainly risk guidance (downtime, prerequisites) rather than invocation correctness.

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?

There is a single required parameter with 100% schema coverage and an inline example ('HDFS', 'YARN'). The description adds nothing beyond the schema about naming conventions or case sensitivity, so baseline 3 applies.

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?

The first sentence gives a specific verb, resource, and scope ('Restarts a specific service in an Ambari cluster (stop then start)'), which implicitly separates it from restart_all_services and restart_host_component. It is clear, though it never names the sibling tools it should not be confused with.

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?

The '[Required Usage Scenarios]' block enumerates concrete triggers such as 'restart HDFS' and troubleshooting/maintenance cases, giving the agent clear when-to-use context. It stops short of explicit exclusions or pointing to start_service/stop_service when only one phase is needed.

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