opensearch_query
Execute any OpenSearch DSL query and get compact synthesized results in table, list, or summary formats, reducing token usage by up to 90%.
Instructions
Execute ANY OpenSearch DSL query and return synthesized results.
You have FULL FLEXIBILITY to build any query:
Complex bool queries with must/should/filter/must_not
has_parent, has_child, nested queries
Any aggregations (terms, stats, date_histogram, scripted_metric, etc.)
Script sorting, script fields, script filters
Geo queries, range queries, wildcards, match, term, etc.
The proxy executes your query and returns COMPACT formatted output instead of raw JSON.
OUTPUT FORMATS:
auto: Detects best format (default)
table: Tabular format for multiple hits
list: One-line-per-hit format
summary: Just counts and aggregations
compact_json: Minimal JSON (only _source, no metadata)
IMPORTANT: Build the full DSL query object as you normally would.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | Index name (optional, defaults to channel_posts) | |
| query | Yes | Complete OpenSearch DSL query object (same as you'd send to _search) | |
| max_display | No | Max hits to display (default: 20, max: 50) | |
| output_format | No | Output format (default: auto) |