Skip to main content
Glama

Get host targets

get_host_targets
Read-only

Read the machines an environment deploys to and the deployments rolled out to them. report picks it: host_targets (each host's status, agent version, OS and last heartbeat; the twin of ankra targets list and get) or deployments (each release rolled out, newest first, with how many hosts succeeded and failed; the twin of ankra deployments list and get). Pass host_target_id or deployment_id for one, with a deployment's per-host results. Needs pipelines.read; only this project's environments are read. A join token is never listed. Read-only: minting a join token and revoking a host are not offered here.

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": {
      "report": "<report>"
    },
    "name": "get_host_targets"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNodeployments: rows to return, 1 to 100 (default 20).
cursorNodeployments: the next_cursor of the previous page.
reportYesWhich listing to read.
environmentNoOnly this environment's hosts or deployments.
deployment_idNodeployments: one deployment (UUID).
repository_idNodeployments: only this repository's (UUID).
host_target_idNohost_targets: one host target (UUID).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true; the description adds real value beyond that with an auth requirement ('Needs pipelines.read'), a scope constraint ('only this project's environments are read'), and a data-sensitivity guarantee ('A join token is never listed'). It also pre-empts hallucinated operations ('minting a join token and revoking a host are not offered here'). It stops short of describing error behavior for invalid or cross-project IDs or host_targets pagination, so a 4 rather than 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.

Conciseness4/5

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

The scope statement and mode-selection rule are front-loaded, and every clause carries information. The second sentence is long and clause-heavy, and the embedded CLI equivalents ('the twin of `ankra targets list` and `get`') add noise for an agent that has no shell context. Slightly denser than it needs to be, but no filler.

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 7-parameter, two-mode listing tool with no output schema, the description covers mode selection, single-record lookup, auth, project scoping, and field-level return content. Pagination and filtering semantics live entirely in the schema, which is acceptable given 100% coverage. Only edge-case behavior (invalid IDs, empty projects) is unaddressed.

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?

With 100% schema description coverage the baseline is 3, but the description adds cross-parameter logic the schema does not: the report enum selects which fields are meaningful, and passing deployment_id yields 'a deployment's per-host results' — a relational meaning absent from the flat schema. limit, cursor, environment, and repository_id remain schema-only, so it does not compensate completely.

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 names a specific verb and two resources ('Read the machines an environment deploys to and the deployments rolled out to them'), and the report branch spells out exactly what each mode returns (status, agent version, OS, last heartbeat vs. release, newest first, success/fail counts). An agent can tell host_targets from deployments without opening the schema. What is missing is any differentiation from the many sibling get_* tools (e.g. get_application_deployments), so the boundary is clear internally but not externally.

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?

Guidance for choosing between the two modes is explicit: 'report picks it' followed by the content of each branch, plus the single-record path via host_target_id or deployment_id. Nothing tells the agent when to prefer this tool over a sibling deployment or host listing, so it falls short of the when/when-not/alternatives bar for a 5.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.