Skip to main content
Glama

api_agent_ai_gateway

Read-onlyIdempotent

Agent AI Gateway — One consistent interface to customer-owned generative AI. Route a real chat completion, an original generated image or spoken MP3 audio through the customer’s own OpenAI account, returning provider model, response type and tangible output. No hidden subscription, keys stored nowhere. One call costs 0.01 USDC on Base x402; customer-owned provider credentials use X-Provider-Key header where needed.

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": {
      "mode": "<mode>",
      "prompt": "<prompt>"
    },
    "name": "api_agent_ai_gateway"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYeschat, image or speech
sizeNoImage dimensions, default 1024x1024
modelNoOptional OpenAI chat model; approved model IDs only
voiceNoOptional TTS voice, default alloy
promptYesText prompt or original content; max 4000 characters

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior2/5

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

The description does add valuable context beyond annotations — per-call price, credential header, no key storage, and the shape of the return (provider model, response type, output). But it is in tension with the supplied hints: 'One call costs 0.01 USDC' describes a wallet-balance side effect against readOnlyHint=true, and 'an original generated image or spoken MP3 audio' with a per-call charge means repeated calls produce different output and cost more, conflicting with idempotentHint=true.

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

Conciseness3/5

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

Purpose is front-loaded and the text is short overall, but several fragments do little work for an agent — 'No hidden subscription, keys stored nowhere' and 'tangible output' are marketing phrasing, and 'tangible output' is vague about what is actually returned (a file? a URL? inline data?). The pricing and credential facts are buried in the same run-on sentence as the sales copy.

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?

With no output schema, the description usefully previews the return payload (provider model, response type, output) and covers the payment and credential prerequisites an agent must handle. What is missing is small but real: how the image/audio artifact is delivered and whether repeated or retried calls are safe given the per-call charge.

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 mode (chat/image/speech), size, model, voice, and the 4000-character prompt limit. The description adds no per-parameter detail beyond this (e.g., which size values are valid, which model IDs are approved), so it sits at the baseline for full-coverage schemas.

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 first sentence states a specific verb and resource ('One consistent interface to customer-owned generative AI') and the second enumerates the three concrete operations: chat completion, generated image, and spoken MP3 audio — routed through the customer's own OpenAI account. That credential-ownership angle also separates it from near-neighbors like api_image_generate or api_omni_ai without needing their schemas.

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 context is implied by the closing line (0.01 USDC per call, X-Provider-Key header where needed), which tells an agent this is a paid, bring-your-own-key path. However, there is no explicit 'use this when…/do not use when…' guidance and no named alternative among the many sibling AI tools, so the agent must infer selection criteria from marketing-adjacent prose.

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