Skip to main content
Glama

Agent Data Tools: Full list (every tool as its own definition)

YAML to JSON: convert a YAML document into JSON

yaml_to_json
Read-only

Convert a YAML document (config files, Kubernetes manifests, OpenAPI specs, front matter) into JSON, parsed by the yaml library with anchors and aliases resolved (alias expansion capped against billion-laughs documents) and duplicate keys refused. Up to 100 KB. Use before feeding YAML into a JSON-only tool or schema check; for the reverse use json_to_yaml. Invalid YAML is a 400 with the parser's message, uncharged. Example: yaml=name: agent ports:

  • 80

  • 443 enabled: true. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.

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": "yaml_to_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
yamlYesThe YAML text (up to 100 KB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: anchors/aliases are resolved with alias expansion capped against billion-laughs documents, duplicate keys are refused, input is capped at 100 KB, and parse failures return an uncharged error. It also explains cost behavior ($0.01 per call, first 25 free, repeats not free), which accounts for the idempotentHint=false flag despite a pure-function tool.

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 verb, resource, and routing alternative, then layered detail. The inline multi-line example runs together with surrounding prose and makes the sentence hard to scan, and the pricing clause is dense, but every element (limits, error handling, billing) carries information an agent needs.

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?

A one-parameter, no-output-schema converter whose constraints, failure mode, and cost model are all covered. The only gap is that the shape of the returned JSON is never stated, though for a faithfully converting tool that is largely inferable.

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 already 100% for the single `yaml` parameter, so the baseline is 3. The description earns one extra point by showing an inline example document that conveys what a well-formed argument looks like, and by restating the 100 KB limit at the point of use.

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 ("Convert a YAML document ... into JSON") and enumerates the concrete input kinds it handles (config files, Kubernetes manifests, OpenAPI specs, front matter). It also names the sibling it is the inverse of (json_to_yaml), so an agent can separate the two without opening either 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 an explicit when: "Use before feeding YAML into a JSON-only tool or schema check", plus an explicit alternative for the opposite direction ("for the reverse use json_to_yaml"). The when-not case is implicit but the routing rule is unambiguous.

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.