Skip to main content
Glama

Build Contributor Query Response

aps_build_contributor_query
Read-onlyIdempotent

Verifies a contributor's share from a signed SettlementRecord and DID, returning per-axis weights, counts, Merkle paths, and roots for third-party validation.

Instructions

Build a contributor-query response: given a signed SettlementRecord and a contributor DID, return per-axis (total_weight, contribution_count, merkle_path, axis_root) plus the full signed record so a third party can verify the contributor's share end-to-end without trusting the gateway beyond its public key. Returns null if the contributor has no share in the period.

Input Schema

NameRequiredDescriptionDefault
recordYesA signed SettlementRecord
gateway_jwksNoAdvisory JWKS URL; not part of the signed material
contributor_didYesContributor DID (data source, compute provider, governance signer, or protocol module identifier)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv4.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / required
      Previous value: -[
      -  "contributor_did"
      -]New value: +[
      +  "record",
      +  "contributor_did"
      +]
  2. Addedv2.8.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the bar is lower. The description adds real value beyond that: it enumerates the returned fields, states the null case when no share exists, and explains the trust guarantee (verifiable end-to-end without trusting the gateway beyond its public key).

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 dense sentences that front-load the action and inputs before the output/verification detail. No filler, though the parenthetical field list is slightly packed.

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?

No output schema exists, so the description appropriately carries the return-value burden by listing the per-axis fields and the null case. Combined with annotations covering safety, an agent has enough to call it correctly.

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 record, gateway_jwks, and contributor_did. The description restates the record and DID inputs but adds no syntax, format, or constraint detail beyond what the schema provides, so the baseline 3 applies.

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?

States a specific verb and resource ("Build a contributor-query response") plus the two required inputs and the per-axis output fields. An agent can grasp the operation without opening the schema, though it doesn't explicitly distinguish itself from nearby siblings like query_contributions, aps_aggregate_settlement, or aps_verify_settlement.

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

Usage Guidelines3/5

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

The precondition ("given a signed SettlementRecord and a contributor DID") and the null-return edge case imply usage, but no explicit when-to-use, when-not, or named alternative tools are given. The agent must infer that this is the proof-generating step versus the aggregate/verify siblings.

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

Deploy Server

Other Tools