Skip to main content
Glama

Fetch External API Metrics (REST / GraphQL)

fetch_external_api_metrics
Read-onlyIdempotent

Fetches financial, SaaS, and advertising metrics from REST or GraphQL APIs with timeout, retry, SSRF protection, and environment-variable authentication.

Instructions

Typed REST/GraphQL client with timeout, exponential-backoff retries, SSRF protection, and env-var auth indirection for financial, SaaS, and advertising metrics.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "fetch_external_api_metrics"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesTarget HTTPS endpoint URL (financial, SaaS, or ads metrics API).
bodyNoOptional JSON request body for REST POST requests.
modeNoAPI protocol mode: REST or GraphQL.rest
dryRunNoWhen true, validates parameters and returns the sanitized request plan without calling the API.
methodNoHTTP method for REST requests. GraphQL automatically uses POST.GET
timeoutMsNoPer-attempt HTTP timeout in milliseconds.
authEnvVarNoEnvironment variable name storing the API token/key (e.g., STRIPE_API_KEY, META_ADS_TOKEN). Keeps secrets out of LLM context.
authSchemeNoAuthorization header scheme when authEnvVar is provided.Bearer
maxRetriesNoMaximum exponential-backoff retry attempts on 429/5xx/network errors.
extractPathNoOptional dot-notation path to extract a focused metric slice from the JSON response (e.g., 'data.summary').
queryParamsNoOptional URL query parameters for REST endpoints.
extraHeadersNoOptional non-secret request headers (e.g., Stripe-Version, X-Account-Id).
graphqlQueryNoGraphQL query or mutation document (required when mode='graphql').
authHeaderNameNoHeader name for credentials (default: Authorization; e.g., X-API-Key for ApiKey).Authorization
graphqlVariablesNoOptional variables object for GraphQL requests.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.4/5.0
Behavior4/5

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

The description adds real behavior beyond the annotations: exponential-backoff retries, per-attempt timeout, SSRF protection, and env-var auth indirection that keeps secrets out of LLM context. These are meaningful operational facts an agent would not otherwise know. What it omits is failure behavior after retries are exhausted, rate-limit handling beyond the retry hint, and the fact that the schema permits POST bodies and GraphQL mutations — a point worth flagging given the readOnlyHint=true annotation, though the description itself does not claim a write capability.

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?

A single dense sentence with no filler, and the capability list is front-loaded. It is efficient, though the feature-list construction spends its budget on adjectives rather than routing guidance the agent actually needs.

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

Completeness3/5

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

For a 15-parameter tool with nested objects and no output schema, the description covers security and reliability well but leaves the agent without guidance on mode selection, response shape, or when dryRun should precede a live call. It is adequate but clearly incomplete for a tool of this complexity.

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 all 15 parameters are already documented in structured form; baseline is 3. The description echoes a few of them (timeout, retries, auth indirection) without adding syntax or format detail beyond the schema, and it says nothing about extractPath, queryParams, extraHeaders, or graphqlVariables that would help the agent wire them together.

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

Purpose4/5

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

The description identifies a specific resource and capability set: a typed REST/GraphQL client for financial, SaaS, and advertising metrics, reinforced by the title's 'REST / GraphQL' qualifier. It is clear what the tool does, but it is framed as a feature list ('client with timeout, retries, SSRF protection') rather than an explicit verb-object statement, and it does not differentiate itself from siblings like append_structured_sheet_row or send_ops_alert.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance. The phrase 'for financial, SaaS, and advertising metrics' hints at domain scope, but nothing tells the agent when to choose this over another sibling, or that dryRun exists as a safe validation path before a real call. The agent must infer usage entirely from the name and schema.

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