Skip to main content
Glama

Get Nodes

get_nodes
Read-only

List nodes of a specific kind with optional filters and pagination. Returns display labels or full attributes for typed queries.

Instructions

List nodes of a specific kind — the default read path for typed queries with optional filtering and pagination.

Prefer this over query_graphql when you just need objects of one kind: results come back as display labels (fast, token-cheap) or full attribute dicts (include_attributes=True).

To discover available kinds, read the infrahub://schema resource. If your client does not support MCP resources, call the get_schema tool instead. To discover available filters for a kind, read infrahub://schema/{kind} or call get_schema(kind='...').

Filter keys follow the schema's filter map. Attribute filters use <attr>__value (e.g. {"name__value": "atl1"}) and relationship filters chain via <rel>__<attr>__value (e.g. {"site__name__value": "atl1"}). See infrahub://schema/{kind} for the full list of valid keys.

Use offset and limit to page through large result sets. The response always includes total_count and has_more so you know when to stop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
kindYesKind of the objects to retrieve. Check infrahub://schema for valid kinds.
limitNoMaximum nodes to return. Default 50. Pass -1 for all results (caution: may be expensive).
branchNoBranch to query. Defaults to the default branch.
offsetNoNumber of results to skip for pagination. Use with limit to page through results.
filtersNoAttribute/relationship filters. Keys follow the schema's filter map (e.g. {"name__value": "atl1"} or {"site__name__value": "atl1"}). See infrahub://schema/{kind} for the full filter map.
partial_matchNoUse partial (substring) matching for string filters.
include_attributesNoWhen True, return full attribute values in TOON tabular format instead of just display labels. More expensive — omit when you only need names/counts.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.2.0
    • changedOutput schema / (root)
      Previous value: -{
      -  "additionalProperties": true,
      -  "type": "object"
      -}New value: +null
  2. First observedv1.1.5

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, but the description adds real behavioral context: two result modes with differing cost (display labels vs full attribute dicts), and a termination signal via 'total_count' and 'has_more'. It doesn't cover permission/auth requirements or branch-resolution behavior, which is the remaining gap.

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?

Front-loaded with the purpose and the query_graphql comparison, then structured into discovery, filter syntax, and paging. Slightly long, and the resource-vs-tool discovery instruction is repeated in two forms, but every block carries usable guidance.

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?

For a 7-parameter read tool with no output schema, the description covers what an agent needs: how to find kinds and filter keys, how filters are shaped, and what the response looks like (labels vs attributes, plus total_count/has_more). Nothing essential to a correct invocation is missing.

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 coverage is 100%, so the schema carries the field-level burden, but the description adds semantics the schema only gestures at: the filter-key convention ('<attr>__value', relationship chaining via '<rel>__<attr>__value') and the paging contract pairing offset/limit with total_count/has_more. Genuinely additive over the schema.

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?

Names a specific verb+resource ('List nodes of a specific kind') and characterizes itself as the 'default read path for typed queries with optional filtering and pagination.' It explicitly distinguishes itself from the sibling 'query_graphql', so an agent can route between the two without opening a schema.

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?

Gives explicit when-to-use ('Prefer this over query_graphql when you just need objects of one kind') and concrete discovery paths for both kinds and filters, including the fallback 'get_schema' tool for clients without MCP resource support. Exclusions and alternatives are both named.

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