Skip to main content
Glama
libragik

universal-ai-agent-bridge

by libragik

llm_query

Query any OpenAI-compatible LLM endpoint with custom prompts, system instructions, and provider overrides, enabling flexible model access from your AI agent.

Instructions

Query ANY external LLM using an OpenAI-compatible /v1 endpoint (e.g. Dahl, DeepSeek, OpenRouter, Groq, Ollama, LM Studio, FreeLLMAPI, 9Router, OmniRoute, or any custom endpoint). Supports reasoning/thinking extraction, custom system prompts, and ad-hoc endpoint overrides.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoThe specific model name/ID (e.g., "MiniMaxAI/MiniMax-M2.7", "deepseek-ai/DeepSeek-V4-Flash-0731", "deepseek-reasoner", "llama-3.3-70b-versatile"). If omitted, uses the provider default.
presetNoName of system persona or prompt preset to apply (e.g. 'security-auditor', 'systems-architect', 'code-simplifier', 'quant-trader', 'fullstack-reviewer', 'explain-like-pro', or custom preset name). Automatically injects specialized system prompt and optimal temperature.
promptYesThe user prompt or query to send to the model.
streamNoEnable SSE streaming mode with live token telemetry (Time-To-First-Token and tokens/sec velocity calculation). Default is false.
api_keyNoAd-hoc API key to use with the endpoint_url or provider.
fallbackNoEnable smart zero-downtime fallback cascade if the primary provider returns HTTP 429 (rate limit) or 5xx error. Default is true.
providerNoThe provider alias to use from vault: "dahl", "openrouter", "deepseek", "groq", "ollama", "lmstudio", "freellmapi", "9router", "omniroute", "cerebras", or custom name. Defaults to active provider.
cache_ttlNoCache time-to-live in seconds. Default is 86400 (24 hours). Use 0 for indefinite caching.
use_cacheNoCheck and store responses in the local dynamic response cache (0ms instant hits, zero token expenditure). Default is true.
max_tokensNoMaximum tokens to generate.
temperatureNoSampling temperature (0.0 to 1.0). Default is 0.7.
endpoint_urlNoAd-hoc OpenAI-compatible /v1 base URL (e.g., "https://inference.dahl.global/v1" or "http://localhost:11434/v1"). Overrides the provider vault.
system_promptNoOptional system instructions or role specification.
fallback_chainNoCustom array of provider keys to try in sequence if primary fails (e.g. ["dahl", "groq", "deepseek", "ollama"]).
compress_tokensNoEnable RTK Smart Prompt Compression to strip redundant whitespace, duplicate logs, and deep library stack traces, saving 20%-40% on input tokens. Default is false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.7/5.0
Behavior3/5

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

No annotations are present, so the description carries the disclosure burden. It discloses ad-hoc endpoint overrides, reasoning extraction, and custom system prompts, but it does not mention that the tool makes external network calls, may incur token costs, reads/writes a local cache, or enables automatic fallback on provider errors. These are meaningful behaviors for an agent, though the description is not misleading and does not contradict any annotations.

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 compact sentences with no filler. The core action and resource are front-loaded, followed by a short feature list that adds value without restating parameter names or repeating schema content.

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?

For a 15-parameter tool with no annotations and no output schema, the description is not fully complete: it omits streaming, caching, fallback cascade, token compression, and cost/network implications. The rich 100%-coverage input schema compensates for parameter-level detail, making the description minimally viable but not comprehensive.

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?

All 15 parameters have schema descriptions (100% coverage), so the schema already carries the per-parameter semantics. The description adds only high-level grouping such as 'custom system prompts' and 'ad-hoc endpoint overrides' rather than detailed parameter meaning, which keeps it at the baseline for high schema coverage.

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 description uses the specific verb 'Query' plus a clear resource ('external LLM via OpenAI-compatible /v1 endpoint'), lists concrete provider examples, and names distinct capabilities like reasoning extraction and endpoint overrides. This clearly differentiates it from the sibling generation and management tools, even without naming them.

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?

The description implies the tool is for general text queries to any external LLM and highlights useful capabilities, but it does not explicitly state when to use this tool versus siblings like llm_compare, llm_autodetect, or llm_generate_image. No exclusions or alternative routing guidance is provided, leaving the choice to inference.

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