Skip to main content
Glama

call_api

Run an API.SH endpoint and return its JSON. Spends the endpoint's credits when the call runs (a success, or a lookup that found nothing); refused calls and errors on our side are free. By default the bulky 'raw' source blocks are left out; set include_raw to get them.

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": {
      "route": "<route>"
    },
    "name": "call_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
freshNoSkip the 24-hour cache.
routeYesThe route, e.g. /reddit/v1/subreddit
paramsNoQuery parameters, e.g. {"subreddit": "python"}
include_rawNoInclude raw source data (much larger).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false, destructiveHint=false and openWorldHint=true; the description goes well beyond them by disclosing the billing model (credits spent on success or empty lookup, refused/our-side errors free), the 24-hour cache, and that 'raw' blocks are stripped by default. Missing only error/return-shape detail and any rate-limit or auth notes.

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

Conciseness5/5

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

Three sentences, front-loaded with the verb and resource, then cost semantics, then the output-shaping default. Every sentence carries information an agent actually needs; nothing is padded.

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

Completeness4/5

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

Covers the credit cost, caching, and default output trimming for a mutating, open-world caller with no output schema. What is missing is a description of the error response shape and how this differs from 'request_api', which matters given the dense sibling set.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description nonetheless adds a default not stated in the schema ('By default the bulky raw source blocks are left out; set include_raw to get them'), which materially changes how the agent sets that flag. It says nothing extra about 'fresh', 'route' or 'params' beyond the schema examples.

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?

States a specific verb and resource ('Run an API.SH endpoint and return its JSON'), which tells an agent exactly what happens. It does not, however, distinguish itself from the sibling 'request_api' or explain how its result relates to 'get_api_request'/'list_api_requests', so the boundary between siblings is left to inference.

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

Usage Guidelines3/5

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

Usage is only implied: 'Spends the endpoint's credits when the call runs' hints at cost-conscious use, but there is no explicit when-to-use, when-not-to-use, or 'prefer X instead' guidance. With a sibling named 'request_api' that plausibly overlaps, the absence of routing guidance is a real gap.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources