Skip to main content
Glama
GautamVhavle

Universal JSON Agent MCP

by GautamVhavle

search_text

Recursively searches every string value in a loaded JSON document for a substring or regex pattern, returning each matching path and value so you can locate terms anywhere in large structures.

Instructions

Recursively search all string values for a substring or regex pattern.

Returns the paths and values of every match found. Useful for finding where a specific term appears anywhere in a large JSON document. Walks as deep as Python allows unless max_depth is set.

Args: alias: The alias of the loaded document. pattern: A substring or regex pattern to search for. path: Optional starting path to narrow the search scope. case_sensitive: Whether matching is case-sensitive (default False). max_depth: Stop after this many nested levels. Omit to walk the full safe depth.

Returns: A list of matching paths and their string values.

Input Schema

NameRequiredDescriptionDefault
pathNo
aliasYes
patternYes
max_depthNo
case_sensitiveNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.2
    • addedInput schema / properties / max_depth
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Max Depth"
      +}
  2. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations provided, the description carries the behavioral burden and does reasonably well: it discloses recursive walking to Python's safe depth unless max_depth is set, case-sensitive matching defaults to False, and returns paths and string values. It omits error behavior and regex flavor details, but the core search behavior is well communicated.

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?

The description is front-loaded with the core purpose and behavior, then uses an Args section to document parameters efficiently. It is slightly longer than strictly necessary because the Returns section duplicates information already conveyed in the opening sentence, but the structure remains clear.

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?

Given that an output schema exists, the description need not detail return values, though it does so anyway. It covers recursion depth, parameter defaults, and the search scope adequately. The remaining gap is sibling differentiation, which is minor for a read-only search tool.

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 for all five parameters, and it does: alias, pattern, path, case_sensitive, and max_depth are each explained with useful semantics. The only minor gap is that the regex syntax/flavor is not specified, leaving some ambiguity for the pattern parameter.

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?

The description states a specific verb and resource: recursively search string values for a substring or regex pattern. It clarifies that it returns paths and values of matches, which is clear. However, it does not explicitly distinguish itself from sibling tools like jsonpath_query, which could also locate values in a JSON document.

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?

The description gives a clear context: useful for finding where a specific term appears anywhere in a large JSON document. It does not state when to use this versus jsonpath_query or filter_objects, nor does it mention exclusions or alternatives. Usage is implied but not explicitly guided.

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