Typed MessagePack composer
Compose stable MessagePack bytes from typed integers, text, binary, arrays and restricted-key maps; exact uint64/int64, encode only.
structured · Operation ID: messagepack-compose
Choose this operation when
- A declared consumer requires this specific binary format and exact integer/binary distinctions
- Create a bounded offline configuration or protocol fixture from supplied typed values
Outside this profile
- Floating point, dates, timestamp/tag extensions, missing-value primitives, custom objects, streaming or arbitrary maps
- Decode or inspect MessagePack bytes; decoding is explicitly held
- A universal MessagePack canonical form
- Network transport, authentication, signatures, COSE/CWT/WebAuthn, consumer schema validation, or execution of decoded content
Exact release references
Static JSON contract · Markdown reference · Fixed example response
Complete input schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"action": {
"type": "string",
"const": "encode"
},
"value": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"action",
"value"
],
"additionalProperties": false,
"$defs": {
"__schema0": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "null"
}
},
"required": [
"type"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "boolean"
},
"value": {
"type": "boolean"
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "integer"
},
"value": {
"type": "string",
"maxLength": 21
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"value": {
"type": "string",
"maxLength": 32768
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "bytes"
},
"base64": {
"type": "string",
"maxLength": 43692
}
},
"required": [
"type",
"base64"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "array"
},
"items": {
"maxItems": 512,
"type": "array",
"items": {
"$ref": "#/$defs/__schema0"
}
}
},
"required": [
"type",
"items"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "map"
},
"entries": {
"maxItems": 128,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "integer"
},
"value": {
"type": "string",
"maxLength": 21
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "text"
},
"value": {
"type": "string",
"maxLength": 32768
}
},
"required": [
"type",
"value"
],
"additionalProperties": false
}
]
},
"value": {
"$ref": "#/$defs/__schema0"
}
},
"required": [
"key",
"value"
],
"additionalProperties": false
}
}
},
"required": [
"type",
"entries"
],
"additionalProperties": false
}
]
}
}
}
Complete output-envelope schema
{
"type": "object",
"required": [
"operation",
"version",
"result",
"provenance"
],
"properties": {
"operation": {
"const": "messagepack-compose",
"type": "string"
},
"version": {
"const": "0.29.0",
"type": "string"
},
"result": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"profile": {
"type": "string",
"const": "messagepack-stable-integer-v1"
},
"action": {
"type": "string",
"const": "encode"
},
"base64": {
"type": "string",
"maxLength": 53336
},
"byteLength": {
"type": "integer",
"minimum": 1,
"maximum": 40000
},
"valueCount": {
"type": "integer",
"minimum": 1,
"maximum": 1024
},
"maxValueDepth": {
"type": "integer",
"minimum": 0,
"maximum": 5
},
"determinismScope": {
"type": "string",
"const": "this-profile-only"
}
},
"required": [
"profile",
"action",
"base64",
"byteLength",
"valueCount",
"maxValueDepth",
"determinismScope"
],
"additionalProperties": false
},
"provenance": {
"type": "object",
"required": [
"inputSha256",
"outputSha256",
"deterministic",
"externalRequests"
],
"properties": {
"inputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"outputSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"deterministic": {
"const": true
},
"externalRequests": {
"const": 0
}
}
}
},
"additionalProperties": false
}
Fixed example
One accepted fixed example, not a custom-input trial. No operation runs when this static page is requested.
Example input
{
"action": "encode",
"value": {
"type": "map",
"entries": [
{
"key": {
"type": "text",
"value": "id"
},
"value": {
"type": "integer",
"value": "18446744073709551615"
}
},
{
"key": {
"type": "text",
"value": "blob"
},
"value": {
"type": "bytes",
"base64": "AP8="
}
}
]
}
}
Example response
{
"operation": "messagepack-compose",
"version": "0.29.0",
"result": {
"profile": "messagepack-stable-integer-v1",
"action": "encode",
"base64": "gqRibG9ixAIA/6JpZM///////////w==",
"byteLength": 22,
"valueCount": 5,
"maxValueDepth": 1,
"determinismScope": "this-profile-only"
},
"provenance": {
"inputSha256": "a4ad025cad1b5ebe3f64d20dac6c26256b62901557a7a6b725a6f08919914302",
"outputSha256": "d3c9928e42a45e1b8a879ed97400b790571dc529da0d3a483f238db6067743f4",
"deterministic": true,
"externalRequests": 0
}
}
Bounds and precision
JavaScript IEEE-754 numbers; use strings for large integer IDs/exact decimals where the schema accepts strings. No lossless numeric parsing.
{
"global": {
"requestBytes": 131072,
"responseBytes": 524288,
"jsonDepth": 32,
"jsonNodes": 20000,
"requestsPerMinute": 60,
"paidAttemptsPerMinute": 20,
"idempotencyHours": 24
},
"operation": {
"inputBytes": 100000,
"outputBytes": 300000,
"jsonNodes": 12000,
"jsonDepth": 20,
"wireBytes": 40000,
"contentBytes": 32768,
"valueNodes": 1024,
"arrayItems": 512,
"mapPairs": 128,
"valueDepth": 5,
"cborKeyBytes": 128,
"messagepackKeyBytes": 64,
"profile": "messagepack-stable-integer-v1",
"actions": "encode",
"integerMinimum": "-9223372036854775808",
"integerMaximum": "18446744073709551615",
"mapKeys": "ASCII text [A-Za-z_][A-Za-z0-9_.-]{0,63}; reserved names rejected",
"determinismScope": "this-profile-only"
}
}
Complete schemas, descriptions and cross-field validation may impose additional limits.
Proposed price and protocol definitions
{
"unit": "one successful operation call",
"proposedNominalUsd": "0.005",
"sixDecimalTokenBaseUnits": "5000",
"subscription": false,
"includesPayerWalletOrNetworkFees": false,
"liveQuoteVerified": false,
"condition": "Actual SDK challenge is authoritative only within the caller's explicit authorization; configured six-decimal token peg is an operator assertion, not a conversion guarantee."
}
Protocol definitions: x402, mpp. MPP uses Tempo charge. Paid MCP execution is unsupported. All runtime readiness is not evaluated in this build.
API path templates, not endpoints on this documentation host
{
"x402": "/v1/x402/messagepack-compose",
"mpp": "/v1/mpp/messagepack-compose"
}
Required headers
{
"Content-Type": "application/json",
"Idempotency-Key": "random 16–128 character operation identifier"
}
Actual SDK challenge amount, asset, network, recipient and wallet costs must pass independent authorization. Preserve identical key, body, protocol and credential on retries; on PAYMENT_UNCERTAIN stop and reconcile.
Execution profile and provider conditions
{
"deterministic": true,
"externalRequests": 0,
"maxExternalRequests": 0,
"resultSnapshotPersisted": false,
"fixedExampleIsIllustrativeSnapshot": false,
"requiresPayment": true,
"supportsMcpExecution": false
}
Deterministic supplied-input operation with no external requests or stored request/result bodies. Payment infrastructure retains payment metadata and hashes.
Failure handling
- HTTP 400: Malformed JSON, missing/invalid idempotency key, or payment identifier mismatch Correct the request before payment
- HTTP 402: Payment challenge or rejected payment Use official protocol SDK; inspect payment outcome before another payment
- HTTP 409: Idempotency conflict, duplicate proof, or PAYMENT_UNCERTAIN Keep original key, body, and proof; reconcile uncertainty with operator; never blindly repay
- HTTP 413: Input or generated output too large Reduce input; no payment attempted for validation failure
- HTTP 415: Unsupported media type or compression Send uncompressed application/json
- HTTP 422: Schema or service-specific semantic validation failure Correct input using returned error code; no payment attempted
- HTTP 429: Request/payment-attempt rate exceeded Wait for rate limit window; preserve existing payment identity
- HTTP 503: Payment configuration/provider/state unavailable, or live DNS preparation failed before settlement Check readiness; DNS preparation failures may retry the identical key/body/credential only; uncertainty requires reconciliation
Declared requirements
Before any paid call, refresh the live operation contract and POST the complete bounded budgeted plan to the separate API's /preflight. Unknown requirements block selection; compatible preflight is not permission to spend.