Skip to main content
Glama

Filesystem MCP Server

by rawr-ai

json_sample

Extract JSON data samples from specified arrays within files. Define path, array location, sample count, and method (first or random) to retrieve precise data segments efficiently.

Instructions

Sample JSON data from a JSON file. Requires maxBytes parameter (default 10KB). Returns a random sample of data from the JSON file. The path must be within allowed directories.

Input Schema

NameRequiredDescriptionDefault
arrayPathYesJSONPath expression to locate the target array (e.g., "$.items" or "$.data.records")
countYesNumber of elements to sample
maxBytesYesMaximum bytes to read from the file. Must be a positive integer. Handler default: 10KB.
methodNoSampling method - "first" for first N elements, "random" for random samplingfirst
pathYesPath to the JSON file containing the array

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "arrayPath": { "description": "JSONPath expression to locate the target array (e.g., \"$.items\" or \"$.data.records\")", "type": "string" }, "count": { "description": "Number of elements to sample", "exclusiveMinimum": 0, "type": "integer" }, "maxBytes": { "description": "Maximum bytes to read from the file. Must be a positive integer. Handler default: 10KB.", "exclusiveMinimum": 0, "type": "integer" }, "method": { "default": "first", "description": "Sampling method - \"first\" for first N elements, \"random\" for random sampling", "enum": [ "first", "random" ], "type": "string" }, "path": { "description": "Path to the JSON file containing the array", "type": "string" } }, "required": [ "path", "arrayPath", "count", "maxBytes" ], "type": "object" }

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