Skip to main content
Glama

urai_chat

Send OpenAI-style chat requests through an automatic key router that rotates API keys on 401/403/429/5xx errors for reliable failover.

Instructions

Send an OpenAI-style chat completion through the automatic key router. Rotates keys on 401/403/429/5xx.

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": {
      "messages": "<messages>"
    },
    "name": "urai_chat"
  }
}

Input Schema

NameRequiredDescriptionDefault
modelNoModel id, provider/model, or auto/free
toolsNoOptional OpenAI tool definitions
systemNoOptional system prompt
messagesYesOpenAI chat messages
providerNoOptional provider id, e.g. opencode
max_tokensNo
temperatureNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuinely valuable behavior: keys rotate on 401/403/429/5xx, implying transparent retry/failover. It omits auth requirements, per-call costidation, rate limiting, whether the call blocks, and what is returned or raised once all keys are exhausted. Useful signal, but far from complete behavioral disclosure for a mutation-free but network-heavy call.

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?

Two tight sentences, front-loaded with the action and followed by the one non-obvious operational trait. No filler, no restating of the tool name, nothing that could be cut without losing meaning.

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

Completeness3/5

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

Seven parameters, no annotations, and no output schema mean the description must carry more weight than it does. It never describes the return shape (presumably an OpenAI completion object, but that is assumed) or the failure mode when all keys are exhausted. Adequate for basic invocation, incomplete for confident use.

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 71%, so the baseline is 3, and the description adds nothing about parameters beyond the schema -- no explanation of the 'auto/free' model selector, no clarification of how 'tools' interacts with the response, and max_tokens/temperature are undocumented in both places. Schema does most of the work; the description neither compensates for the uncovered 29% nor enriches what is covered.

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?

The description names a specific verb and resource -- 'Send an OpenAI-style chat completion' -- plus the mechanism ('automatic key router'). That clearly separates it from the sibling tools (urai_keys, urai_models, urai_health), which are management/introspection rather than inference. It stops short of explicitly naming a sibling it should be preferred over, so it lands at 4.

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

Usage Guidelines2/5

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

There is no statement of when to use this versus an alternative, no prerequisitesa, and no exclusions. An agent is left to infer that 'automatic key router' means 'use this when you want managed/rotating credentials,' but that is deduction, not guidance. Nothing tells the caller to consult urai_models first to pick a model id.

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