Skip to main content
Glama

fetch_consent_record

Lê (read-only) um consent PDA do consent-manager on-chain. Aceita user + dataFiduciary + purposeText (hashed) OU user + dataFiduciary + purposeHashHex (pre-computed). Retorna o registro decodificado ou null se não existir.

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": {
      "user": "<user>",
      "dataFiduciary": "<dataFiduciary>"
    },
    "name": "fetch_consent_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
userYesUser (data principal) pubkey base58.
purposeTextNoTexto da finalidade (será hashed). Usar OU purposeText OU purposeHashHex.
dataFiduciaryYesData fiduciary pubkey base58 (server wallet se criado via submit_consent_record).
purposeHashHexNoPurpose hash já computado (hex, 64 chars). Alternativa a purposeText.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations supplied, the description does real work by declaring the operation read-only and stating the null-if-absent return semantics, which is exactly the kind of behavioral detail an agent needs. It stops short of covering anything else: no mention of authorization prerequisites, whether the PDA must already be initialized, or what error surfaces for a malformed purpose hash.

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?

Three compact sentences: operation and read-only nature first, then the accepted parameter combinations, then the return contract. There is no filler, and the null case is stated in the same breath as the success case.

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

Completeness3/5

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

For a four-parameter read tool with no annotations and no output schema, the description covers purpose and return contract but leaves a gap: the schema requires only user and dataFiduciary while the description presents a purpose field as mandatory via the OU construction, with no statement of what happens when neither purposeText nor purposeHashHex is supplied. Nothing describes the shape of the decoded record beyond 'registro decodificado'.

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 baseline is 3 and the schema already explains each field. The description's marginal contribution is restating the either/or relationship between purposeText (hashed) and purposeHashHex (pre-computed), which the schema parameters also state individually.

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: read a consent PDA from the on-chain consent-manager, returning the decoded record or null. That is unambiguous and clearly a read operation, though it never names a sibling such as submit_consent_record or verify_consent, so differentiation is left to the agent's own inference.

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 description implies usage (fetch an existing consent record by its identifying triad) and spells out the two alternative parameter combinations, but gives no explicit when-to-use or when-not-to-use guidance relative to verify_consent or fetch_compliance_attestation. The agent must infer that this is the lookup path for an already-recorded consent.

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