Skip to main content
Glama
GautamVhavle

Universal JSON Agent MCP

by GautamVhavle

filter_objects

Filter arrays of objects by a field condition using operators like eq, neq, gt, contains, or regex to return only matching records from loaded JSON documents.

Instructions

Filter an array of objects by a field condition.

Operators: eq, neq, gt, gte, lt, lte, contains, regex.

Args: alias: The alias of the loaded document. path: Dot-notation path to the array (e.g. "products", "data.users"). field: The field name to filter on (e.g. "status", "price"). operator: Comparison operator (eq, neq, gt, gte, lt, lte, contains, regex). value: The value to compare against.

Returns: The filtered objects with a match count header.

Input Schema

NameRequiredDescriptionDefault
pathYes
aliasYes
fieldYes
valueYes
operatorYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden; it does disclose the return shape (filtered objects plus a match count header). It stays silent on error behavior for an unknown alias or bad path, on regex syntax and case sensitivity, and on whether the operation mutates the loaded document or is a pure read.

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 purpose sentence followed by an Args/Returns block, which is easy to scan and appropriately short. The operator list is repeated verbatim in two places, a small redundancy that could be trimmed.

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?

With five required parameters, zero schema descriptions, and no annotations, the definition does a decent job but leaves real gaps around operator semantics (case sensitivity, regex flavor, comparison across types) and failure modes. An output schema exists, so the Returns note is optional rather than compensating for anything.

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 does: all five required parameters are documented with concrete example values for path and field, and the operator vocabulary is spelled out. What remains unspecified is how 'value' is coerced per operator (e.g., regex needs a string pattern, contains on strings vs arrays).

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 (filter an array of objects by a field condition) and enumerates the supported operators, which is far more informative than the bare name. It does not, however, distinguish itself from siblings such as multi_filter or jsonpath_query, which an agent could plausibly reach for on the same data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to use this instead of multi_filter (multiple conditions), jsonpath_query, or search_text, and no prerequisites such as needing the document loaded first via load_json. Usage is only inferable from the operator list.

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