Skip to main content
Glama

Run an API or model call

run_api

Execute one selected OpenAny API, or send one selected model to chat completions. Requires the caller's OpenAny API key on the MCP connection as Authorization: Bearer . A call with no key is rejected locally and does not reach the gateway. Never ask the user to paste the key into chat; use the client's secure secret settings. First call get_api. Pass its api and api_version, and input that matches input_schema. Model calls can incur charges. Supports finite JSON, UTF-8 plain text and Markdown. Optional output only changes presentation: raw (default), structural summary, or compact for JSON objects/arrays with explicit items_path for nested arrays. A timeout after dispatch has unknown execution or charging state: do not retry automatically.

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": {
      "api": "<api>",
      "api_version": "<api_version>",
      "input": "<input>"
    },
    "name": "run_api"
  }
}

Input Schema

NameRequiredDescriptionDefault
apiYes
inputYes
outputNo
api_versionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the auth mechanism (Bearer key on the MCP connection), that keyless calls are rejected locally before reaching the gateway, that model calls can incur charges, and that a post-dispatch timeout leaves execution and charging state unknown. These are exactly the non-obvious facts an agent needs before invoking an open-world, non-idempotent tool.

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?

Front-loads the two execution modes, then the credential requirement, then the required call sequence, then caveats. Sentences are short and nearly all load-bearing, though the trailing output-mode sentence is dense enough to read as compressed rather than crisp.

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?

For a four-parameter, nested-object, externally-charged tool with no output schema, the description still covers authentication, preconditions, charge risk, retry hazards, and supported content types. Nothing an agent needs in order to call it safely is missing.

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 description coverage is 0% at the top level, so the description has to compensate; it explains the output presentation modes (raw default, summary, compact), the items_path requirement for nested arrays, and that output only affects presentation and not upstream fields or pricing. It adds little about api, api_version, or the input object beyond deferring to get_api and input_schema, so the compensation is good but not complete.

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 plus two concrete modes: execute one selected OpenAny API, or send one selected model to chat completions. It also names its prerequisite sibling (get_api), so an agent can immediately separate discovery from execution.

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 an explicit call order ("First call get_api. Pass its api and api_version"), tells the agent where the credential must live, and forbids asking the user to paste the key. It also states a when-not case: do not retry automatically after a timeout.

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.