Skip to main content
Glama

util_yaml_json

Read-only

YAML to JSON converter — Offline YAML 1.2 to JSON (yaml=) or JSON to YAML (json=) conversion with clear line-numbered parse errors. Handles block and flow collections, quoted, plain and block scalars (| and > with chomping), anchors, aliases, merge keys and multi-document streams; warns on duplicate keys. Optional indent= 1-8. Max 200000 chars. Price: $0.002 USDC (Base, via x402).

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": {
      "yaml": "<yaml>"
    },
    "name": "util_yaml_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
yamlYesports: [80, 443]

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint true, destructiveHint false), and the description adds genuinely new behavioral facts: line-numbered parse errors, duplicate-key warnings, supported YAML features, size limit and x402 cost. Two caveats keep it from a 5: the advertised 'json=' input has no counterpart in the schema, and 'Offline' sits awkwardly against openWorldHint=true.

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-loads purpose and direction, then layers limits and pricing in one dense paragraph with no filler sentences. The feature enumeration (block/flow collections, chomping, anchors, aliases, merge keys) is long but each item earns its place as a capability signal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only, single-parameter converter the description is mostly sufficient, and readOnlyHint plus the stated price and size cap cover the operational essentials. However, it never explains how JSON-to-YAML is actually invoked given the schema exposes only a 'yaml' field, leaving the documented reverse direction unusable as written.

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

Parameters2/5

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

Schema coverage is 100% for the single required 'yaml' property, so the baseline would be 3. But the description introduces two parameters that the schema does not contain ('json=' and 'indent=' 1-8), while saying nothing about what the real 'yaml' field accepts; an agent following the description would attempt calls the schema rejects.

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?

States a specific verb+resource pair (YAML to JSON conversion) and immediately names both directions plus the exact inputs (yaml=, json=). It is unmistakably distinguishable from siblings like util_xml_json or util_json_diff.

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?

Clear operating context: conversion between the two formats, a 200000-character cap, and a stated price, which lets an agent decide feasibility before calling. It never explicitly routes away from a sibling (e.g. when to prefer util_xml_json or ai_json_repair), so it stops short of full when/when-not guidance.

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.

Resources