Skip to main content
Glama

rag_query

Read-only

Ask questions with retrieval-augmented context from xAI Collections; cached answers accelerate repeated queries.

Instructions

Ask a question with RAG-enhanced context from xAI Collections. Uses LAZY-RAG cache for 100,000x speedup on repeated queries.

Input Schema

NameRequiredDescriptionDefault
questionYesQuestion to ask

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.4.1
  2. Removedv1.4.0
  3. Addedv1.3.1
  4. Removedv1.3.0
  5. First observedv1.2.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so safety and external-reach context is covered. The description adds genuine behavioral value by disclosing the LAZY-RAG cache layer and its speedup on repeated queries, but says nothing about latency on cache misses, auth requirements, or rate limits.

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?

Two short, front-loaded sentences with no filler. The '100,000x speedup' figure leans promotional rather than operational, which costs a point, but the structure is otherwise clean.

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 single-parameter read tool with no output schema, nothing critical is missing to invoke it, but the definition never says what comes back (an answer only, or answer plus source context/citations). That omission is minor given the annotations, but it leaves the agent guessing at the response shape.

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 coverage is 100% and the single 'question' parameter is self-explanatory, so the schema does the heavy lifting. The description adds no syntax, format, or scope detail beyond what the schema already provides, making the baseline 3 appropriate.

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 states a specific verb and resource: ask a question and get RAG-enhanced context from xAI Collections. It clearly identifies the tool's function and separates it from the cache-management siblings by name ('cache'), though it never names rag_cache_stats or rag_cache_clear explicitly.

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 explicit guidance on when to use this versus alternatives. The mention of 'repeated queries' hints at the caching benefit but never tells the agent when to query directly, when to check rag_cache_stats, or when rag_cache_clear is relevant, leaving routing to inference.

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