aldabra/crates
Kayos 91c5d557b6 fix(mcp): force type:object on Value-typed metadata/policy args
schemars derives an empty (no-type) JSON Schema for Option<serde_json::Value>
and serde_json::Value fields. Claude Code's MCP client interprets schema-
without-type as 'string-encoded' and JSON-stringifies the user's {...}
before sending — at which point the server-side validation
`value.is_object()` returns false and the tool errors with
'CIP-25 metadata must be a JSON object' / 'CIP-68 metadata must be a
JSON object'.

Surfaced during Track #37 E2E test (2026-05-09): wallet_mint and
wallet_mint_cip68_nft both rejected metadata-as-object args from
Claude Code while the SAME object via raw stdio MCP works fine —
proves the issue is client-side schema interpretation, not server.

Fix: add a json_object_schema helper that emits {type: object,
additionalProperties: true} and annotate every metadata + policy
field with #[schemars(schema_with = "json_object_schema")].
Affected fields:
- MintArgs.metadata
- MintUnsignedArgs.policy + .metadata
- Cip68NftArgs.metadata

additionalProperties is left wide-open since these args really do
accept arbitrary keys (CIP-25/CIP-68 are open-ended schemas).
2026-05-09 09:23:34 -07:00
..
aldabra-chain feat(mcp,chain,dao): support Koios paid-tier bearer via ALDABRA_KOIOS_BEARER env 2026-05-08 10:19:06 -07:00
aldabra-core fix(core): bump WITNESS_OVERHEAD_BYTES from 256 to 512 2026-05-08 07:42:06 -07:00
aldabra-dao fix(dao,mcp): tie vote tx TTL to validity_upper_slot so Voted.posix_time matches chain's reconstructed validRange.upperBound 2026-05-09 06:09:48 -07:00
aldabra-mcp fix(mcp): force type:object on Value-typed metadata/policy args 2026-05-09 09:23:34 -07:00