Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
URAI_KEYS_FILENoPath to the keys file (part of the keys.txt search order, used when --keys is not passed; falls back to ./keys.txt, ~/.config/urai-router/keys.txt, and other default locations)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Urai Router routes OpenAI-compatible chat requests across every API key in your keys.txt. Use urai_chat for completions, urai_models to discover models (free OpenCode Zen models are included), urai_health to inspect key health, and urai_ensure_proxy to get a local OpenAI-compatible base URL. Never print API keys: the tools only return masked values.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
urai_chatB

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

urai_modelsC

List the merged model catalogue from all configured providers, including free OpenCode Zen models.

urai_keysB

Show masked API keys, health, cooldowns and key counts per provider.

urai_healthA

Show router health, key file, catalogue freshness and proxy status.

urai_statsA

Show routing statistics (same as health plus catalogue details).

urai_explainB

Explain how a model or alias would be routed, which providers qualify and how many keys are ready.

urai_refreshC

Reload keys.txt and refresh provider model catalogues.

urai_ensure_proxyB

Start the local OpenAI-compatible proxy in the background if needed and return its base URL.

urai_checkC

Probe one or all keys with a tiny request and report which ones are valid.

urai_setupC

Generate/merge OpenCode, Kiro and skill configuration. dry_run defaults to true.

Prompts

Interactive templates invoked by user choice

NameDescription
route_requestInstructions for routing a coding request through Urai Router

Resources

Contextual data attached and managed by the client

NameDescription
Urai Router configRedacted router configuration
Key healthMasked keys and cooldown state
ProvidersProvider registry with base URLs and auth style
ModelsMerged model catalogue
StatsRouter status and catalogue freshness

TDQS

B3.3/5.0

Scored across 10 tools

Disambiguation3/5

Most tools have distinct actions, but urai_health and urai_stats explicitly overlap, with stats described as health plus catalogue details. urai_check and urai_keys also partially overlap on key health/validity, which could cause misselection.

Naming Consistency4/5

All tools use the same urai_ prefix and snake_case, with a mostly predictable split between action verbs and resource nouns. The mix of verb-style and noun-style names is minor but still readable.

Tool Count5/5

Ten tools is well-scoped for a routing server covering chat, key checks, proxy startup, configuration, model listing, and diagnostics. Each tool maps to a plausible operational need.

Completeness4/5

The surface covers core routing, key inspection/refresh, proxy startup, model catalogue, setup, and diagnostics. Minor gaps exist around stopping the proxy or adding/removing keys directly, but agents can work around these by editing keys.txt or relying on existing operations.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues