Skip to main content
Glama

submit_consent_record

Submete uma transação real on-chain no consent-manager program (DPDP India §6) — record_consent. Server wallet assina como data fiduciary; o user (data principal) precisa ser uma pubkey válida. Retorna tx signature + PDA. Para produção, use o SDK client-sdk com seu próprio keystore; esta tool é para validação/dev.

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>",
      "purposeCode": "<purposeCode>",
      "purposeText": "<purposeText>"
    },
    "name": "submit_consent_record"
  }
}

Input Schema

NameRequiredDescriptionDefault
userYesUser (data principal) Solana pubkey em base58.
expiresAtNoUnix timestamp (segundos) de expiração opcional. Omitir para consent sem expiração.
storageUriNoURI off-chain opcional apontando pro termo de consent assinado. Max 128 bytes.
purposeCodeYesCódigo numérico u16 da finalidade (0-65535). Taxonomia é definida off-chain.
purposeTextYesTexto humano da finalidade (ex: "marketing_communications"). Será hashed via sha256 para obter o purpose_hash on-chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and discloses key behavior: the server wallet signs as data fiduciary, the user must be a valid pubkey, and the call returns a tx signature plus a PDA. It does not state that the on-chain write is irreversible, who pays fees, or what happens on failure, which keeps it short of full transparency.

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 short sentences, front-loaded with the core action and the on-chain target, followed by signing responsibility, return values, and the production caveat. Every clause carries information and nothing is padded.

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?

For a mutation tool with no annotations and no output schema, the description covers the essentials an agent needs: what is written on-chain, who signs, what the return looks like, and when not to use it. Failure modes, fee responsibility, and idempotency/duplicate-consent behavior are the remaining gaps.

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; the description adds little beyond the schema, repeating that the user must be a valid pubkey and restating obligations rather than explaining formats or edge cases. The sha256 hashing of purposeText is noted, but the schema already documents it.

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 names a concrete verb and resource: submitting a real on-chain transaction to the consent-manager program implementing the `record_consent` instruction (DPDP India §6). This clearly separates it from read-oriented siblings like fetch_consent_record and from submit_consent_revoke by naming the specific on-chain instruction it executes.

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 gives an explicit production-vs-dev routing rule: for production, use the client-sdk with your own keystore; this tool is for validation/dev. That is a genuine when-to-use/when-not-to-use statement, though it does not mention sibling tools such as verify_consent or submit_consent_revoke as alternatives for adjacent tasks.

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