json_structure
Analyze the structure of JSON files by mapping top-level keys to their data types, including array element types. Use parameters to control file size and depth for efficient analysis of large JSON data within secure directories.
Instructions
Get the structure of a JSON file by analyzing its top-level keys and their types. Returns a mapping of key names to their corresponding data types (string, number, array, etc). For arrays, it also indicates the type of the first element if available. This is useful for understanding the shape of large JSON files without loading their entire content. Requires maxBytes
(default 10KB) and maxDepth
(default 2) parameters. The path must be within allowed directories.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
detailedArrayTypes | No | Whether to analyze all array elements for mixed types (default: false) | |
maxBytes | Yes | Maximum bytes to read from the file. Must be a positive integer. Handler default: 10KB. | |
maxDepth | Yes | How deep to analyze the structure. Must be a positive integer. Handler default: 2. | |
path | Yes | Path to the JSON file to analyze |