Skip to main content
Glama

list_hosts

Retrieve host records from Foreman with optional search filters and field selection, narrowing results by location, OS, or other attributes.

Instructions

List hosts from Foreman with optional search filter and field filtering.

CONTEXT OPTIMIZATION: Default per_page=10 to prevent overflow. Use search filters like 'location ~ SYD03' or 'os ~ Windows' to narrow results. Total hosts available: ~1000+. Always use search parameter for large inventories.

Field filtering: By default returns essential fields only (id, name, ip, os, location, status). Use include_fields="all" for complete data, or specify comma-separated fields like "id,name,ip,mac".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNo
searchNo
per_pageNo
include_fieldsNo
Behavior4/5

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

With no annotations, the description fully discloses behavioral traits: default per_page, default fields returned, and the ability to request all fields or specific ones. It mentions total hosts (~1000+). However, it does not cover error handling, rate limits, or authentication expectations, but these are less critical for a read-only list tool.

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

Conciseness5/5

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

The description is front-loaded with the core purpose, followed by a clear CONTEXT OPTIMIZATION section, search usage, and field filtering details. Every sentence is valuable; no wasted words. Format is well-structured and easy 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?

No output schema exists, so the description explains return values: 'essential fields only (id, name, ip, os, location, status)' and how to get complete data. It also provides scale context ('Total hosts available: ~1000+'). For a list operation, this is complete and covers the agent's likely questions.

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

Parameters5/5

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

Schema description coverage is 0%, so the description compensates fully. It explains per_page's default and purpose, search parameter usage with concrete examples, and include_fields options (default essential fields vs. 'all' or custom list). This adds significant meaning beyond the schema's basic parameter names.

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 clearly states 'List hosts from Foreman with optional search filter and field filtering.' It specifies the verb (list) and resource (hosts) and distinguishes from sibling tools like get_host (singular) and search_hosts_by_* (specific filters).

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?

Provides explicit usage guidance: default per_page=10 to prevent overflow, search filter examples (e.g., 'location ~ SYD03'), and advises 'Always use search parameter for large inventories.' Also explains field filtering options, helping the agent decide when to use include_fields.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/InfraMCP/foreman-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server