Skip to main content
Glama

yq YAML processor

yq
Read-only

Query and transform YAML files using yq expressions, returning compact structured JSON output instead of reading the entire file.

Instructions

Query and transform YAML files using yq expressions (mikefarah/yq). Outputs as JSON for structured consumption. Far more compact than reading a full YAML file.

Input Schema

NameRequiredDescriptionDefault
fileNoPath to a YAML file
inputNoRaw YAML string to process (alternative to file)
expressionNoyq expression (default: '.').
outputFormatNoOutput format (default: 'json' for structured output)json

Output Schema

NameRequiredDescriptionDefault
formatYes
resultYes
retainedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A3.5/5.0
Behavior3/5

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

With readOnlyHint=true already declaring a safe read operation, the bar is lower. The description adds that output is emitted as JSON for structured consumption, which is useful context beyond the annotation, but says nothing about error behavior or expression limitations. Adequate but not rich.

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?

Three short sentences, front-loaded with the core action and engine. The compactness note earns its place as a selection rationale; nothing is redundant.

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?

An output schema exists and the schema fully documents parameters, so the description needn't explain return shapes. For a read-only query tool, the definition covers action, engine, and output format adequately, with only minor gaps around usage selection.

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?

Schema coverage is 100%, so all four parameters (file, input, expression, outputFormat) are already documented in the schema. The description adds no parameter-level detail beyond naming 'yq expressions,' so the baseline 3 is appropriate.

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?

States a specific verb+resource (query/transform YAML) and names the underlying engine (mikefarah/yq), which distinguishes it from the jq sibling that handles JSON. The purpose is clear, though it doesn't explicitly contrast itself with jq or describe the transformation scope.

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?

'Far more compact than reading a full YAML file' implies preferring this over cat for YAML inspection, which gives some usage direction. However, there is no explicit when-to-use/when-not guidance or named alternative (e.g., 'use jq for JSON'), leaving it implied rather than stated.

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