-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Description
Summary
Add output filtering capabilities to control which fields are returned and how data is formatted.
Motivation
API responses often contain many fields, but users frequently only need a subset. Reducing output to relevant fields:
- Reduces token usage when used with LLMs
- Improves readability of results
- Allows focusing on specific data for analysis
Proposed Implementation
Add three optional parameters to applicable tools:
fields parameter
- Accepts a list of field names to include in output
- Supports dot notation for nested fields (e.g.,
quote.price) - Special presets using
@preset_namesyntax:@greeks- Delta, gamma, theta, vega, rho@options_summary- Key options data fields@options_quote- Price/volume quote data
output_format parameter
json(default) - Standard JSON outputcsv- CSV format for tabular datacompact- Condensed single-line JSON
aggregate parameter
sum,avg,min,max,count- Aggregate numeric fields
Example Usage
fields: ["symbol", "strike", "@greeks"]
output_format: "csv"
Returns only symbol, strike, and greek values in CSV format.
Additional Context
This is particularly useful for options chain data where responses can be large but only specific fields are needed for analysis.
Metadata
Metadata
Assignees
Labels
No labels