Skip to main content
Glama
Sugra-Systems

Sugra API MCP

Official

fetch_data

Read-onlyIdempotent

Automatically selects the best Sugra API endpoint for your natural-language query and retrieves the data in one step. Provide required parameters to get results or receive a list of missing parameters to refine your request.

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:

  1. Search the bundled catalog for the query. Top match wins.

  2. If the matched endpoint has required parameters and they are all provided in params, call it and return the response.

  3. If required parameters are missing, return the candidate endpoints and the missing-params list so the LLM can retry with the correct params dict 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

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoJSON body for an auto-selected POST operation; the tool returns the request_body_schema to fill when the match needs one. Pass a JSON object or a JSON array as that schema's top-level type dictates.
limitNoBounds ONLY the top-level list: the envelope data list (or a bare top-level array). Nested lists inside records are never truncated; meta.shaped reports whether the limit applied.
queryYesNatural-language request for data (examples: 'US CPI', 'Bitcoin price', 'latest news'). The tool picks the top catalog match and calls it. If required params are missing it returns needs_params instead of guessing.
fieldsNoOptional projection of keys to keep on each record. Dotted paths (geo.city) walk nested objects. meta.shaped reports fields_applied and fields_unmatched. Omit to keep every key.
paramsNoParameters 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_rawNoIf true, attach the original unshaped payload under raw when it fits the size cap; otherwise meta.raw_omitted explains why. Default false.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.11.0
  2. Removedv0.9.1
  3. First observedv0.8.2

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already carry the safety profile (readOnlyHint=true, idempotentHint=true, destructiveHint=false), so the bar is lower; the description still adds real value by disclosing the step-by-step behavior (top match wins, missing required params returns candidates + missing-params list for retry) and showing concrete call examples. It doesn't describe rate limits or exact response envelopes, but the output schema covers the return shape. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is longer than average but every section earns its place: purpose line, usage routing, numbered behavior list, and three concrete examples. It is front-loaded with the core purpose. Only mild redundancy (the params/body retry behavior appears in both the numbered list and the schema descriptions) keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Complete for a moderately complex tool (6 params, 1 required, output schema present). The output schema explains return values, so the description need not. It covers selection behavior, retry contract, usage boundaries vs siblings, and example invocations. Nothing an agent needs to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all six parameters in detail, including the limit scoping rule, fields projection with dotted paths, and include_raw semantics. The description adds marginal value by showing params usage in examples, but does not go beyond what the schema states. Baseline 3 is correct.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('find the best Sugra endpoint for the query and call it') and explicitly names the siblings it combines (search_endpoints + call_endpoint). An agent can immediately distinguish this one-shot convenience tool from the manual three-step dance. This is well above the vague 'fetch data' baseline.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit when-to-use ('without manually picking an operation_id', 'most natural-language queries') and when-not-to-use (when you need explicit control, the search_endpoints + describe_endpoint + call_endpoint dance is still available). Names the alternative tools directly. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.