Skip to main content
Glama

Prepare API Exchange

prepare_api_exchange
Read-onlyIdempotent

Free validation before buying a receipt. Supply an event built locally with the SDK from real captured bytes; never fabricate hashes. Returns the commitment without issuing a receipt or paying. Use when retaining verifiable evidence of an API response for a handoff or archive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventYesCommitment-only HTTP exchange declaration built locally with the SDK. No raw URLs, headers or bodies.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYes
eventYesCommitment-only HTTP exchange declaration built locally with the SDK. No raw URLs, headers or bodies.
commitmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed34 schema fields changed
    • addedInput schema / properties / event / description
      Added value: +"Commitment-only HTTP exchange declaration built locally with the SDK. No raw URLs, headers or bodies."
    • addedInput schema / properties / event / properties / attestation / description
      Added value: +"The caller declares the exchange; Datoka does not independently observe it."
    • addedInput schema / properties / event / properties / bodyEncoding / description
      Added value: +"Hash application bytes after HTTP decoding, without JSON reserialization."
    • addedInput schema / properties / event / properties / completedAt / description
      Added value: +"Declared UTC completion with milliseconds; must be at or after startedAt."
    • addedInput schema / properties / event / properties / headerEncoding / description
      Added value: +"Use the SDK header selection and JCS canonicalization before hashing."
    • addedInput schema / properties / event / properties / method / description
      Added value: +"Actual HTTP method of the locally captured exchange, for example GET."
    • changedInput schema / properties / event / properties / requestBodyHash / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "algorithm": {
      -        "const": "sha256",
      -        "type": "string"
      -      },
      -      "digest": {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "algorithm",
      -      "digest"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "algorithm": {
      +        "const": "sha256",
      +        "description": "Digest algorithm; always sha256.",
      +        "type": "string"
      +      },
      +      "digest": {
      +        "description": "SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters.",
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "algorithm",
      +      "digest"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / event / properties / requestHeadersHash / properties / algorithm / description
      Added value: +"Digest algorithm; always sha256."
    • addedInput schema / properties / event / properties / requestHeadersHash / properties / digest / description
      Added value: +"SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters."
    • changedInput schema / properties / event / properties / responseBodyHash / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "algorithm": {
      -        "const": "sha256",
      -        "type": "string"
      -      },
      -      "digest": {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "algorithm",
      -      "digest"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "algorithm": {
      +        "const": "sha256",
      +        "description": "Digest algorithm; always sha256.",
      +        "type": "string"
      +      },
      +      "digest": {
      +        "description": "SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters.",
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "algorithm",
      +      "digest"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / event / properties / responseHeadersHash / properties / algorithm / description
      Added value: +"Digest algorithm; always sha256."
    • addedInput schema / properties / event / properties / responseHeadersHash / properties / digest / description
      Added value: +"SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters."
    • addedInput schema / properties / event / properties / startedAt / description
      Added value: +"Declared UTC start with milliseconds, for example 2026-10-07T08:00:00.000Z."
    • addedInput schema / properties / event / properties / status / description
      Added value: +"Actual HTTP response status, including error responses; for example 200 or 404."
    • addedInput schema / properties / event / properties / targetHash / properties / algorithm / description
      Added value: +"Digest algorithm; always sha256."
    • addedInput schema / properties / event / properties / targetHash / properties / digest / description
      Added value: +"SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters."
    • addedInput schema / properties / event / properties / version / description
      Added value: +"Declaration format version; preserve this literal."
    • addedOutput schema / properties / event / description
      Added value: +"Commitment-only HTTP exchange declaration built locally with the SDK. No raw URLs, headers or bodies."
    • addedOutput schema / properties / event / properties / attestation / description
      Added value: +"The caller declares the exchange; Datoka does not independently observe it."
    • addedOutput schema / properties / event / properties / bodyEncoding / description
      Added value: +"Hash application bytes after HTTP decoding, without JSON reserialization."
    • addedOutput schema / properties / event / properties / completedAt / description
      Added value: +"Declared UTC completion with milliseconds; must be at or after startedAt."
    • addedOutput schema / properties / event / properties / headerEncoding / description
      Added value: +"Use the SDK header selection and JCS canonicalization before hashing."
    • addedOutput schema / properties / event / properties / method / description
      Added value: +"Actual HTTP method of the locally captured exchange, for example GET."
    • changedOutput schema / properties / event / properties / requestBodyHash / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "algorithm": {
      -        "const": "sha256",
      -        "type": "string"
      -      },
      -      "digest": {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "algorithm",
      -      "digest"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "algorithm": {
      +        "const": "sha256",
      +        "description": "Digest algorithm; always sha256.",
      +        "type": "string"
      +      },
      +      "digest": {
      +        "description": "SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters.",
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "algorithm",
      +      "digest"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / event / properties / requestHeadersHash / properties / algorithm / description
      Added value: +"Digest algorithm; always sha256."
    • addedOutput schema / properties / event / properties / requestHeadersHash / properties / digest / description
      Added value: +"SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters."
    • changedOutput schema / properties / event / properties / responseBodyHash / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "properties": {
      -      "algorithm": {
      -        "const": "sha256",
      -        "type": "string"
      -      },
      -      "digest": {
      -        "pattern": "^[a-f0-9]{64}$",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "algorithm",
      -      "digest"
      -    ],
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "properties": {
      +      "algorithm": {
      +        "const": "sha256",
      +        "description": "Digest algorithm; always sha256.",
      +        "type": "string"
      +      },
      +      "digest": {
      +        "description": "SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters.",
      +        "pattern": "^[a-f0-9]{64}$",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "algorithm",
      +      "digest"
      +    ],
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / event / properties / responseHeadersHash / properties / algorithm / description
      Added value: +"Digest algorithm; always sha256."
    • addedOutput schema / properties / event / properties / responseHeadersHash / properties / digest / description
      Added value: +"SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters."
    • addedOutput schema / properties / event / properties / startedAt / description
      Added value: +"Declared UTC start with milliseconds, for example 2026-10-07T08:00:00.000Z."
    • addedOutput schema / properties / event / properties / status / description
      Added value: +"Actual HTTP response status, including error responses; for example 200 or 404."
    • addedOutput schema / properties / event / properties / targetHash / properties / algorithm / description
      Added value: +"Digest algorithm; always sha256."
    • addedOutput schema / properties / event / properties / targetHash / properties / digest / description
      Added value: +"SHA-256 of exact locally captured bytes, encoded as 64 lowercase hexadecimal characters."
    • addedOutput schema / properties / event / properties / version / description
      Added value: +"Declaration format version; preserve this literal."
  2. Changed10 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / event / properties / apiId / description
      Added value: +"Caller-chosen API identifier; not a certified provider identity."
    • addedInput schema / properties / event / properties / exchangeId / description
      Added value: +"Stable identifier for one declared HTTP exchange."
    • addedInput schema / properties / event / properties / requestHeadersHash / description
      Added value: +"SHA-256 of locally canonicalized selected request headers. Never send raw headers."
    • addedInput schema / properties / event / properties / responseHeadersHash / description
      Added value: +"SHA-256 of locally canonicalized selected response headers."
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / properties / event / properties / apiId / description
      Added value: +"Caller-chosen API identifier; not a certified provider identity."
    • addedOutput schema / properties / event / properties / exchangeId / description
      Added value: +"Stable identifier for one declared HTTP exchange."
    • addedOutput schema / properties / event / properties / requestHeadersHash / description
      Added value: +"SHA-256 of locally canonicalized selected request headers. Never send raw headers."
    • addedOutput schema / properties / event / properties / responseHeadersHash / description
      Added value: +"SHA-256 of locally canonicalized selected response headers."
  3. Changed6 schema fields changed
    • addedInput schema / properties / event / properties / requestBodyHash / description
      Added value: +"SHA-256 of exact application request bytes; null means no body, not an empty body."
    • addedInput schema / properties / event / properties / responseBodyHash / description
      Added value: +"SHA-256 of exact application response bytes after HTTP decoding. Preserve those bytes; do not reserialize JSON."
    • addedInput schema / properties / event / properties / targetHash / description
      Added value: +"SHA-256 of the exact UTF-8 target URL, computed locally. Never invent a digest or send the URL itself."
    • addedOutput schema / properties / event / properties / requestBodyHash / description
      Added value: +"SHA-256 of exact application request bytes; null means no body, not an empty body."
    • addedOutput schema / properties / event / properties / responseBodyHash / description
      Added value: +"SHA-256 of exact application response bytes after HTTP decoding. Preserve those bytes; do not reserialize JSON."
    • addedOutput schema / properties / event / properties / targetHash / description
      Added value: +"SHA-256 of the exact UTF-8 target URL, computed locally. Never invent a digest or send the URL itself."
  4. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered. The description adds real behavioral context beyond that: the call is free, issues no receipt, requires no payment, and the input must be SDK-built from real captured bytes ('never fabricate hashes'). It stops short of describing what the returned commitment actually is or whether validation can fail.

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?

Four short sentences, front-loaded with the cost/value proposition ('Free validation before buying a receipt'), then input constraints, then return behavior, then the use case. Efficient, with only mild redundancy between the 'commitment' and 'no receipt' statements.

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?

With an output schema present the description need not explain return values, and annotations cover the safety profile. It supplies the cost model, the no-side-effect guarantee, and the input-integrity constraint, which is what an agent needs to decide and invoke correctly. Minor gap: no hint about validation-failure behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with rich nested field descriptions, so the baseline is 3. The description earns an extra point by adding construction guidance the schema cannot convey in one place: the event must be built locally with the SDK from real captured bytes rather than hand-crafted.

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?

States a specific action (free validation of an exchange declaration producing a commitment) and explicitly distinguishes itself from the paid path ('Returns the commitment without issuing a receipt or paying'), which maps directly onto the sibling issue_api_receipt. An agent can tell it apart from issue_api_receipt and verify_api_receipt without opening either schema.

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?

Gives a clear when-to-use ('when retaining verifiable evidence of an API response for a handoff or archive') and positions itself as the free pre-step before buying a receipt, implicitly routing to issue_api_receipt. It does not explicitly state when not to use it versus verify_api_receipt, so it falls short of full alternative coverage.

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