Skip to main content
Glama

Chat Completions API

call_model

Run a non-streaming text or structured-output model call using a selected project UUID and runtime API key ID. Send model and messages; max_tokens, temperature and response_format are optional. For typed output use response_format={type:json_schema,json_schema:{name:answer,strict:true,schema:}} and choose a model supporting structured_output. Normal inference costs, plan restrictions and policy checks apply. Use get_trace with the returned meta.trace_uuid when retention is enabled. Advanced tool calling and multimodal inputs use the SDK or HTTP API. Requires runtime:call.

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": {
      "uuid": "<uuid>",
      "id": "<id>",
      "model": "<model>",
      "messages": "<messages>"
    },
    "name": "call_model"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesRuntime API key ID in this project; its secret is never returned by this operation
uuidYesProject UUID in the authorized organization
modelYesExact model ID from list_models, or a deployed dynamic/<route-name>.
messagesYesText conversation to send to the model. A single user message is enough to test a model.
max_tokensNoOptional output token limit. Omit to use the model default.
temperatureNoOptional sampling temperature. Omit to use the model default.
response_formatNoOptional structured output. Omit or use null for ordinary text. json_object requests JSON; json_schema specifies its shape. The returned message content contains the generated JSON text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare non-read-only, non-idempotent, open-world, non-destructive behavior; the description adds what annotations cannot convey — that normal inference costs, plan restrictions and policy checks apply, that streaming is not supported, and that tracing depends on retention being enabled. That is meaningful behavioral context beyond the structured fields. It does not discuss failure modes or error behavior for policy/plan rejections, which keeps it off a 5.

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-loaded with the core action and scope, then prerequisites and follow-up routing, so a reader can stop early. Sentences are dense but each carries distinct information; the response_format example is long but functional. Minor cost: the middle clauses ('Normal inference costs, plan restrictions and policy checks apply') are slightly list-like and could be tighter.

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?

For a 7-parameter, no-output-schema inference tool the description covers scope, optionality, permissions, cost, tracing and structured output, which is most of what an agent needs. The main residual gap is the return shape beyond meta.trace_uuid — an agent must infer that content lives in a message/choices structure. Given the schema documents response_format's output as 'the generated JSON text,' this is a small rather than a blocking omission.

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 real meaning by showing the exact response_format shape for structured output and by requiring a model that supports structured_output, a constraint absent from the schema. It also clarifies that max_tokens, temperature and response_format are optional, which is not obvious from required-only inspection.

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 and resource ('Run a non-streaming text or structured-output model call') plus the scoping qualifiers (project UUID, runtime API key ID) that separate it from the org-key variant. It also carves out what it does not do ('Advanced tool calling and multimodal inputs use the SDK or HTTP API'), so an agent can distinguish it from both siblings and adjacent media tools without opening a schema.

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

Usage Guidelines4/5

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

Gives clear when-to-use context: non-streaming inference, optional structured output, and a follow-up routing hint ('Use get_trace with the returned meta.trace_uuid when retention is enabled'). It also supplies prerequisites ('Requires runtime:call'). It stops short of naming the alternative tool for the org-key path, so selection between the two call variants is left partly to inference.

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