Skip to main content
Glama

byte_query_fact

Query a PayPerByte fact-oracle publisher for a signed answer with citations. Posts the question to a registered fact-oracle publisher (topic='fact-oracle'), waits for the on-chain BroadcastStreamed response, and returns the answer plus structured citation URLs. The signed receipt proves which publisher produced the answer (provenance + tamper-evidence), NOT that the answer is correct — ground your output in the cited sources, not in a truth guarantee. Availability: this requires a registered fact-oracle publisher actively broadcasting; if none is live the call returns a timeout rather than an answer.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
questionYesThe factual question to ask (e.g. 'What was last night's Lakers vs Warriors score?'). Should be specific and verifiable.
topic_filterNoOptional topic filter (e.g. 'fact-oracle' default; future: 'sports', 'finance').
max_byte_costNoMax response payload bytes you're willing to pay for (defaults to 2000). Billed at the publisher's registered price-per-KB — read it with byte_get_publisher or byte_search_publishers before asking. Publisher refuses if can't fit answer.
min_publisher_pqsNoMinimum PQS to consider (BPS scale, 0-10000). 9000 = Elite-only, 7500 = Premium+.
subscriber_addressYesYour wallet address. You MUST be subscribed to the chosen publisher (with sufficient USDC escrow) or the publisher's on-chain broadcast will be skipped.
max_response_latency_msNoMax time to wait for the publisher's broadcast (default 30000 ms). Local-LLM publishers (Ollama + Searxng + 3-sample NLI gate) take ~30-60s; Anthropic + passthrough takes ~10-20s. Hard ceiling 180s.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoError message if the query failed (no eligible publisher, broadcast timeout, etc.)
answerNoPublisher's grounded answer to the question
citationsNoURLs/sources cited by the publisher in support of the answer
confidenceNoPublisher-reported confidence (0-1)
elapsed_msNoEnd-to-end time to obtain the answer (ms)
request_idNoRequest id binding the query to this answer
payload_hashNokeccak256 of the response payload
publisher_pqsNoPublisher quality score (PQS) at fulfillment
publisher_addressNoPublisher address that fulfilled the query
response_size_bytesNoSize of the response payload (bytes)
publisher_tx_or_statusNoDelivery status or settlement reference

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / max_byte_cost / description
      Previous value: -"Max response payload bytes you're willing to pay for (defaults to 2000, ≈$1 at $0.0005/byte). Publisher refuses if can't fit answer."New value: +"Max response payload bytes you're willing to pay for (defaults to 2000). Billed at the publisher's registered price-per-KB — read it with byte_get_publisher or byte_search_publishers before asking. Publisher refuses if can't fit answer."
  2. Changed15 schema fields changed
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • changedOutput schema / properties / citations / description
      Previous value: -"URLs cited by the publisher in support of the answer"New value: +"URLs/sources cited by the publisher in support of the answer"
    • removedOutput schema / properties / citations / items / type
      Removed value: -"string"
    • addedOutput schema / properties / confidence
      Added value: +{
      +  "description": "Publisher-reported confidence (0-1)",
      +  "type": "number"
      +}
    • addedOutput schema / properties / elapsed_ms
      Added value: +{
      +  "description": "End-to-end time to obtain the answer (ms)",
      +  "type": "number"
      +}
    • removedOutput schema / properties / feePaid
      Removed value: -{
      -  "description": "USDC fee paid for the broadcast (atomic)",
      -  "type": "string"
      -}
    • removedOutput schema / properties / payloadHash
      Removed value: -{
      -  "description": "keccak256 of the response payload",
      -  "type": "string"
      -}
    • addedOutput schema / properties / payload_hash
      Added value: +{
      +  "description": "keccak256 of the response payload",
      +  "type": "string"
      +}
    • removedOutput schema / properties / publisher
      Removed value: -{
      -  "description": "Publisher address that fulfilled the query",
      -  "type": "string"
      -}
    • addedOutput schema / properties / publisher_address
      Added value: +{
      +  "description": "Publisher address that fulfilled the query",
      +  "type": "string"
      +}
    • addedOutput schema / properties / publisher_pqs
      Added value: +{
      +  "description": "Publisher quality score (PQS) at fulfillment",
      +  "type": "number"
      +}
    • addedOutput schema / properties / publisher_tx_or_status
      Added value: +{
      +  "description": "Delivery status or settlement reference",
      +  "type": "string"
      +}
    • addedOutput schema / properties / request_id
      Added value: +{
      +  "description": "Request id binding the query to this answer",
      +  "type": "string"
      +}
    • addedOutput schema / properties / response_size_bytes
      Added value: +{
      +  "description": "Size of the response payload (bytes)",
      +  "type": "number"
      +}
    • removedOutput schema / properties / txHash
      Removed value: -{
      -  "description": "BroadcastStreamed transaction hash",
      -  "type": "string"
      -}
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "answer": {
      +      "description": "Publisher's grounded answer to the question",
      +      "type": "string"
      +    },
      +    "citations": {
      +      "description": "URLs cited by the publisher in support of the answer",
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "error": {
      +      "description": "Error message if the query failed (no eligible publisher, broadcast timeout, etc.)",
      +      "type": "string"
      +    },
      +    "feePaid": {
      +      "description": "USDC fee paid for the broadcast (atomic)",
      +      "type": "string"
      +    },
      +    "payloadHash": {
      +      "description": "keccak256 of the response payload",
      +      "type": "string"
      +    },
      +    "publisher": {
      +      "description": "Publisher address that fulfilled the query",
      +      "type": "string"
      +    },
      +    "txHash": {
      +      "description": "BroadcastStreamed transaction hash",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
  4. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The description goes well beyond the annotations, disclosing behaviors an agent needs to know: the tool performs an on-chain posting (spend/state-changing despite destructiveHint=false, consistent with readOnlyHint=false), it blocks waiting for a broadcast with a hard timeout, it returns a signed receipt proving provenance but explicitly NOT correctness, and it fails with a timeout rather than an answer when no publisher is live. The openWorldHint=true annotation is echoed by the description's honest framing of answers as grounded-in-citations rather than guaranteed facts. No behavioral surprises are left undisclosed.

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 description is dense but well-structured: three sentences that front-load the purpose, then unpack mechanics, then the correctness caveat, then availability/timeout behavior. Each sentence carries distinct information — no filler or repetition. The length is justified by the tool's complexity (on-chain interaction, billing, subscription requirements, timing). It could be tightened slightly (e.g., 'PayPerByte' and 'fact-oracle' are each repeated), but the structure makes the key facts easy to scan.

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

Completeness4/5

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

Given the tool's complexity — 6 parameters, on-chain posting, paid queries, subscription prerequisites, broadcast timing variance, and an output schema — the description covers the essential context: the full request lifecycle (post → wait → return), the timeout failure mode, the billing model (price-per-KB, refusal if over budget, cross-reference to publisher lookup tools), and the epistemic caveat that the signed receipt attests provenance not correctness. Minor gaps exist (e.g., behavior on partial failures like insufficient escrow mid-flight), but those are reasonably delegated to the output schema.

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% — every one of the 6 parameters has a rich description including examples, units (BPS scale, ms, bytes), enums-like explanations (9000=Elite-only, 7500=Premium+), cross-tool references, and hard constraints (regex pattern, min/max bounds). Per the rubric, high coverage (>80%) sets the baseline at 3; the main description adds no parameter-level semantics beyond what the schema already provides, which is appropriate given the schema's thoroughness.

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 leads with a specific verb–resource–outcome triplet ('Query a PayPerByte fact-oracle publisher for a signed answer with citations') and then details the mechanism (posts question on topic='fact-oracle', waits for on-chain broadcast, returns answer plus citation URLs). It clearly distinguishes this tool from the sibling set — it is the query-side counterpart to byte_publish_data, the consumer of byte_search_publishers/byte_get_publisher, and the producer of payloads that byte_verify_payload would verify.

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

Usage Guidelines4/5

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

The description gives strong situational guidance: it explains the on-chain broadcast flow, the timeout behavior when no publisher is live, and the crucial caveat to ground outputs in cited sources rather than trusting the signed answer. Parameter-level docs reinforce when-to-use details by naming sibling tools ('read it with byte_get_publisher or byte_search_publishers before asking') and specifying the subscription prerequisite ('You MUST be subscribed... or the publisher's on-chain broadcast will be skipped). It stops short of explicitly saying 'use this instead of X for scenario Y' for a named alternative, but the guidance is nevertheless concrete and actionable.

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.