Skip to main content
Glama
Universal JSON Agent MCP

Universal JSON Agent MCP

by GautamVhavle

get_keys

Retrieve all keys from a JSON object or item count from an array at a specified path in a loaded document using its alias.

Instructions

Get all keys at a given path in a loaded JSON document.

Works on objects (returns key names) and arrays (returns index count).

Args: alias: The alias of the loaded document. path: Dot/bracket notation path to navigate into the document. Examples: "", "data.users", "items[0].tags". Empty string means root.

Returns: List of keys (for objects) or item count (for arrays).

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": {
      "alias": "<alias>"
    },
    "name": "get_keys"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo
aliasYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load. It does disclose a genuinely non-obvious trait — arrays return an item count rather than indices — but says nothing about failure behavior (invalid alias, nonexistent path) or the prerequisite that the alias come from load_json.

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 summary sentence followed by compact Args/Returns blocks; every line contributes. Slightly docstring-formulaic but no wasted prose.

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 two-parameter read tool this covers the essential call semantics, and the explicit Returns section is redundant-but-harmless given an output schema exists. The main omission is the load_json prerequisite and error/edge-case behavior for missing paths.

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 description coverage is 0%, so the description must compensate, and it largely does: alias is defined as the loaded document's alias, and path gets a notation specification, three concrete examples, and an explanation that empty string means root. Minor gap: no mention of where valid alias values come from.

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 and resource ("Get all keys at a given path in a loaded JSON document") and clarifies the dual behavior on objects vs arrays. An agent can distinguish it from get_value/get_structure, though the description never explicitly contrasts itself with the many similarly-named siblings (distinct_paths, get_structure, jsonpath_query).

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?

Usage is implied rather than stated: "loaded document" and the required alias signal that load_json must run first, but there is no explicit when-to-use/when-not guidance and no named alternative for retrieving values instead of keys. An agent must infer the choice between this and get_structure/get_value.

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