Skip to main content
Glama
rawr-ai

Filesystem MCP Server

json_filter

Filter JSON array data using flexible conditions. Apply comparison operators (equals, contains, etc.) and combine with AND/OR logic. Specify a JSON file path and conditions to extract matching objects efficiently.

Instructions

Filter JSON array data using flexible conditions. Supports various comparison operators (equals, greater than, contains, etc.) and can combine multiple conditions with AND/OR logic. Requires maxBytes parameter (default 10KB). Perfect for filtering collections of objects based on their properties. The path must be within allowed directories.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
arrayPathNoOptional JSONPath expression to locate the target array (e.g., "$.items" or "$.data.records")
conditionsYesArray of filter conditions
matchNoHow to combine multiple conditions - "all" for AND, "any" for ORall
maxBytesYesMaximum bytes to read from the file. Must be a positive integer. Handler default: 10KB.
pathYesPath to the JSON file to filter
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the 'maxBytes' parameter constraint and path restrictions ('within allowed directories'), which are useful. However, it doesn't describe error handling, performance characteristics, or what happens when conditions aren't met, leaving gaps for a mutation-like filtering 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?

The description is appropriately sized with three sentences that each add value: core functionality, parameter note, and use case. It's front-loaded with the main purpose. Minor room for improvement in flow, but overall efficient with zero waste.

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 tool with 5 parameters, 100% schema coverage, and no output schema, the description provides adequate context on what the tool does but lacks details on output format, error cases, or integration with sibling tools. It's minimally complete but could better address the tool's role in the broader JSON toolset.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds minimal value beyond the schema, mentioning 'maxBytes' default and path restrictions but not elaborating on parameter interactions or usage examples. Baseline 3 is appropriate when schema does the heavy lifting.

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?

The description clearly states the tool's purpose with specific verbs ('filter JSON array data') and resources ('JSON array data'), distinguishing it from siblings like json_get_value (extracts values) or json_validate (validates structure). It explicitly mentions the filtering capability with conditions and operators.

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 implies usage context ('Perfect for filtering collections of objects based on their properties') but doesn't explicitly state when to use this tool versus alternatives like json_search_kv or json_query. No guidance on prerequisites or exclusions is provided, leaving usage somewhat ambiguous.

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

Install Server

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rawr-ai/mcp-filesystem'

If you have feedback or need assistance with the MCP directory API, please join our Discord server