Skip to main content
Glama

LLMExpert transcription

Query a collection

query_collection
Read-only

Charged: $0.05 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.

Input Schema

TableJSON 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 and openWorldHint; the description adds the full behavioral picture: $0.05 flat pricing, the x402 keyless payment handshake (payment-required result, retry with _meta, receipt in _meta), and the explicit rule to never re-pay after a 409 or 502. This is exactly the kind of cost/error/auth context annotations cannot carry.

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?

The cost is correctly front-loaded and the payment mechanics are compressed into dense but non-redundant sentences. It runs long for a single tool, but nearly every clause conveys an actionable constraint (scope, 409/502 handling, ownership), so little is wasted.

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?

With no output schema, the description still tells the agent what comes back (answer with citations, payment-required result in structuredContent, receipt in _meta). Combined with the pricing, auth, and retry semantics, nothing needed to invoke this correctly 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 all four parameters are already documented in the schema, and the description adds no syntax or constraint detail for query, session_id, or idempotency_key. The _meta['x402/payment'] mention is a transport mechanism, not a tool parameter. Baseline 3 applies.

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?

States a specific verb+resource ('Ask a question of a collection and get a generated answer with citations') and pins it to an HTTP endpoint. The resource (collection) clearly separates it from the sibling query_channel without needing to open either schema.

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?

Gives an explicit precondition ('Query a collection once get_status says completed'), names a sibling for pricing exactness ('quote returns the exact price'), and states the auth requirement ('needs the key's query scope'). It also specifies the keyless ownership rule, so the agent knows when this call is even permitted.

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