Skip to main content
Glama

get_hosts

Read-only

List all registered hosts in an Ambari cluster to audit nodes, monitor availability, and support cluster management tasks.

Instructions

Retrieves the list of hosts in the Ambari cluster.

[Tool Role]: Dedicated tool for listing all hosts registered in the Ambari cluster.

[Core Functions]:

  • Query Ambari REST API for host list

  • Return host names and API links

  • Provide formatted output for LLM automation and cluster management

[Required Usage Scenarios]:

  • When users request cluster host list or host details

  • When auditing or monitoring cluster nodes

Returns: List of hosts (success: formatted list, failure: error message)

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": "get_hosts"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.9.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds that it queries the Ambari REST API and returns host names with API links plus an error message on failure, which is modest extra context, but this largely restates the output schema rather than disclosing new behavior such as pagination, ordering, or failure modes.

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

Conciseness2/5

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

The bracketed template sections are redundant: '[Tool Role]: Dedicated tool for listing all hosts' simply restates the first sentence, and the 'Returns' block duplicates information already available in the output schema. Only the first sentence and the core-function bullets carry real content, so a fair share of the text does not earn its place.

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 zero-parameter read-only listing tool with annotations and an output schema, the description covers purpose, data source, an outline of returned content, and failure signaling. The only meaningful omission is differentiation from get_host_details, which is left implicit.

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?

The tool takes zero parameters, so there is no parameter semantics burden to discharge. The schema is an empty object with additionalProperties=false, and the description correctly offers no parameter discussion, leaving nothing ambiguous.

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 opening sentence states a specific verb and resource ('Retrieves the list of hosts'), which clearly identifies a read/list operation on cluster hosts. However, it does not distinguish itself from the sibling get_host_details, and the usage line even claims it applies 'when users request ... host details', which blurs the boundary with that sibling.

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

Usage Guidelines3/5

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

Two usage scenarios are given ('cluster host list or host details', 'auditing or monitoring cluster nodes'), which is more than nothing. But no alternatives are named or excluded, and the inclusion of 'host details' as a scenario actively muddies rather than sharpens selection guidance given the get_host_details sibling.

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