Skip to main content
Glama

apihub_call

Sends payment. Calls a paid endpoint on an onboarded APIHub service. Debits the endpoint's price from your credit balance and forwards the request to the upstream provider. Returns an object with the upstream response body, HTTP status, and credits_charged_microdollars. Requires a valid API key and sufficient credit balance; if balance is insufficient the call returns a 402 with payment requirements (use apihub_topup to add credits, apihub_balance to check). Use this for services already onboarded to APIHub (find slugs via apihub_search or apihub_list_services); use apihub_call_external for arbitrary x402 URLs not onboarded here, or apihub_read_content for content gateways.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoOptional. Request body as a JSON string for POST/PUT. Ignored for GET/DELETE. The proxy forwards this verbatim with Content-Type: application/json.
methodNoOptional HTTP method, default GET. Must match the method declared on the endpoint or the request will fail.
service_slugYesRequired. The service slug as returned by apihub_search or apihub_list_services, e.g. 'exchange-rates' or 'weather'.
endpoint_pathYesRequired. The endpoint path including any leading slash, e.g. '/latest/USD' or '/v1/forecast'. Get valid paths from apihub_get_service.

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries full burden. It discloses key behaviors: debiting credits, forwarding requests, returning a structured object, requiring API key and balance, and returning 402 on insufficient funds. It does not mention timeout/retry/upstream failure behavior, but the main side effects and error conditions are clearly stated.

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 fairly long but every sentence is informative and well-structured. It front-loads the primary purpose, then covers payment mechanics, prerequisites/errors, and alternatives. No filler or redundancy; it earns its length.

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?

Given no output schema, the description explains the return value (upstream response body, HTTP status, credits_charged_microdollars). It covers prerequisites, error handling, alternative tools, and parameter specifics. The tool has moderate complexity, and the description is thorough enough for an agent to use it correctly.

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 baseline is 3. The description adds value beyond schema by clarifying that body is ignored for GET/DELETE, forwarded verbatim with Content-Type: application/json, that method must match the endpoint declaration, and that endpoint_path includes a leading slash. This helps correct usage beyond the schema alone.

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?

The description clearly states the tool's core function: calling a paid endpoint on an onboarded APIHub service, with specific mention of debiting credits and forwarding requests. It distinguishes itself from siblings by explicitly naming alternatives (apihub_call_external, apihub_read_content) and the onboarded scope.

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?

The description provides explicit guidance on when to use this tool (for onboarded services) and when to use alternatives (apihub_call_external for arbitrary URLs, apihub_read_content for content gateways). It also covers prerequisites (API key, sufficient balance) and error handling (402 with payment requirements), including references to apihub_topup and apihub_balance.

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.

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct role: balance check, service discovery (list/search), service details, paid calls (onboarded vs external vs content), and credit top-up. The similar pairs (search vs search_external, call vs call_external) are separated by onboarded vs external scope, and descriptions explicitly guide selection.

Naming Consistency4/5

All names share the 'apihub_' prefix and use snake_case, with verbs like get, list, search, call, read. However, 'balance' and 'topup' deviate from the verb_noun pattern, making the convention slightly inconsistent but still predictable and readable.

Tool Count5/5

With 9 tools, the set is well-scoped for a credit-based API marketplace. Each tool serves a distinct step in the workflow (discover, inspect, call, manage funds), with no redundant tools and nothing missing at the broad level.

Completeness4/5

The surface covers the full lifecycle: searching and listing services, retrieving details, making calls to both onboarded and external APIs, reading content, checking balance, and topping up credits. Minor gaps like transaction history or service ratings exist but do not hinder the core purpose.