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, ≈$1 at $0.0005/byte). 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. Dates show when Glama detected each change.

  1. 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"
      -}
  2. 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"
      +}
  3. First observed

TDQS

A4.5/5.0
Behavior5/5

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

The description goes beyond annotations by detailing the on-chain interaction, the signed receipt's evidentiary limits, and the timeout behavior when no publisher is live. This adds significant transparency about external dependencies and result interpretation beyond the basic flags.

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?

The description is three sentences, with the core purpose in the first sentence, followed by caveats and availability. No redundant information; each sentence adds value.

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?

For a tool with a full output schema and thorough parameter documentation, the description covers the operational context, failure mode (timeout), and interpretational caveat (provenance != correctness). It is complete enough for an agent to invoke correctly and process the response appropriately.

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?

The input schema already provides 100% description coverage, with each parameter having detailed descriptions including defaults, constraints, and examples. The tool description does not add additional parameter-level semantics beyond referencing the question posting and timeout, so the baseline of 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?

The description clearly states the tool's function: 'Query a PayPerByte fact-oracle publisher for a signed answer with citations.' It specifies the resource (fact-oracle publisher), action (query), and output (signed answer with citations), distinguishing it from sibling tools like byte_publish_data or byte_verify_payload.

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?

It provides clear context by explaining the query flow (posts question, waits for broadcast, returns answer) and crucial guidance that the signed receipt proves provenance but not correctness, instructing users to ground output in cited sources. It also mentions the availability requirement of a registered publisher, but does not explicitly name alternative tools for other use cases.

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.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool targets a distinct action or resource, and overlapping functions (buy_data vs subscribe, check_subscription vs list_my_subscriptions) are explicitly differentiated in descriptions. No two tools appear to do the same thing.

Naming Consistency4/5

Most tools follow the byte_verb_noun pattern (e.g., byte_buy_data, byte_get_publisher), but a few deviate: byte_subscription_health uses a noun phrase, and byte_unsubscribe lacks an explicit object. The consistent byte_ prefix keeps the set recognizable.

Tool Count5/5

15 tools is at the upper edge of the well-scoped range, and each tool serves a distinct purpose within the PayPerByte protocol—discovery, purchasing, publishing, verification, and account management. No redundant or filler tools.

Completeness4/5

Core lifecycle coverage is strong: list/search, subscribe/unsubscribe, buy, publish, register, verify, health, and network stats. Minor gaps exist, such as no explicit tool to fetch historical streamed messages or update a publisher schema, but these are workable.