fetch_data
Searches and calls the matching Sugra API endpoint for your query, returning data directly without manual selection.
Instructions
One-step fetch: find the best Sugra endpoint for the query and call it.
Combines search_endpoints + call_endpoint into a single round trip. Use this when you want data without manually picking an operation_id. The full search_endpoints + describe_endpoint + call_endpoint dance is still available when you need explicit control, but for most natural-language queries this tool is enough.
Behavior:
Search the bundled catalog for the query. Top match wins.
If the matched endpoint has required parameters and they are all provided in
params, call it and return the response.If required parameters are missing, return the candidate endpoints and the missing-params list so the LLM can retry with the correct
paramsdict on the next call.
Examples:
fetch_data("US CPI inflation", params={"series_id": "CPIAUCSL"})→ calls /api/v1/fred/series/CPIAUCSL, returns observations.fetch_data("Bitcoin price", params={"coin_id": "bitcoin"})→ calls /api/v1/crypto/bitcoin/price.fetch_data("Latest financial news")→ news_latest has no required params, returns latest news directly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | JSON body for an auto-selected POST operation; the tool returns the request_body_schema to fill when the match needs one. | |
| limit | No | ||
| query | Yes | ||
| fields | No | ||
| params | No | Parameters for the auto-selected endpoint. If omitted and the best-match endpoint has required parameters, the tool returns that endpoint's required_parameters and examples so you can retry with them filled in. | |
| include_raw | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||