Skip to main content
Glama

LLMExpert: cited Q&A over YouTube videos

Query a collection

query_collection
Read-only

Charged: $0.02 flat per call by default, no token multiplier. Ask a question of a collection and get a generated answer with citations. Maps to POST /v1/collections/{collectionId}/query. Query a collection once get_status says completed. With an API key it needs the key's query scope. Without an API key this tool is payable in USDC via x402: the first call returns a payment-required result (isError with the payment requirements in structuredContent); an x402-aware MCP client signs and retries the same call with _meta['x402/payment'], and the receipt returns in the result's _meta['x402/payment-response']. Never pay again after a 409 (already presented) or 502 (settlement unknown) result. Keyless, only the address that paid for the collection may query it. Prices are the service defaults; quote returns the exact price.

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": {
      "collection_id": "<collection_id>",
      "query": "<query>"
    },
    "name": "query_collection"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe natural-language question.
session_idNoOptional session for multi-turn continuity.
collection_idYesCollection to query.
idempotency_keyNoIdempotency-Key for safe retries.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover readOnlyHint/openWorldHint; the description goes far beyond them, disclosing pricing ($0.02 flat, no token multiplier), the full x402 keyless payment handshake, where payment requirements and receipts appear (`structuredContent`, `_meta`), and retry-safety rules. This is exactly the context an agent needs to invoke correctly and avoid double-paying.

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?

Every sentence carries load — purpose, pricing, prerequisite, auth, payment flow, failure handling — so little is wasted. However, leading with a billing line rather than the purpose is slightly off front-loading, and the payment-flow passage is dense enough to slow a skimming agent.

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

Completeness5/5

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

There is no output schema, so the description must carry the return story — and it does, covering the citation-bearing answer, the payment-required result, the retry receipt location, and terminal 409/502 outcomes. Nothing needed to call it successfully is missing.

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 100%, so the schema already documents all four parameters, and the description adds essentially no per-parameter detail beyond the URL-template mapping. Baseline 3 is the correct ceiling when the schema does the heavy lifting.

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 states a specific verb and resource — 'Ask a question of a collection and get a generated answer with citations' — and reinforces it with the exact underlying route POST /v1/collections/{collectionId}/query. That resource scoping (a collection, not a channel) cleanly distinguishes it from the sibling query_channel.

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

Usage Guidelines5/5

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

It gives the prerequisite ('Query a collection once `get_status` says completed'), the required auth scope ('the key's `query` scope'), the keyless constraint, and routes to the sibling `quote` for exact pricing. It also names failure conditions with explicit follow-up rules ('never pay again after a 409 or 502').

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