{"uid":"cap_UyDznNsjutiJWlMXTXUov","slug":"nft-metadata-mutator-with-canonical-hash-3095f1b5","name":"NFT Metadata Mutator with Canonical Hash","description":"Applies ordered set/remove attribute and set name/description operations to caller-supplied metadata, then hashes canonical output. It does not mint, sign, upload, mutate an on-chain token, preserve media, or verify ownership.","url":"https://gaming.halowerk.com/v1/nft-metadata-mutate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"asset_id":{"type":"string","maxLength":256,"minLength":1},"metadata":{"type":"object","required":["name","description","attributes"],"properties":{"name":{"type":"string","maxLength":256,"minLength":1},"attributes":{"type":"array","items":{"type":"object","required":["key","value"],"properties":{"key":{"type":"string","maxLength":128,"minLength":1},"value":{"type":["string","number","boolean","null"]}},"additionalProperties":false},"maxItems":1000},"description":{"type":"string","maxLength":4096,"minLength":0}},"additionalProperties":false},"operations":{"type":"array","items":{"type":"object","required":["op"],"properties":{"op":{"enum":["set_attribute","remove_attribute","set_name","set_description"],"type":"string"},"key":{"type":"string","maxLength":128,"minLength":1},"value":{"type":["string","number","boolean","null"]}},"additionalProperties":false},"maxItems":1000,"minItems":1}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_56pXgisehHRzO-Kgr3hI1","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Applies ordered set/remove attribute and set name/description operations to caller-supplied NFT metadata, then returns a hash of the canonical result.","exampleAgentPrompt":"Take my sword NFT metadata for asset 'sword-042' — it has name 'Iron Sword', description 'A basic blade', and attributes [{key:'damage',value:10},{key:'rarity',value:'common'}] — and apply these operations: set_attribute damage to 25, remove_attribute rarity, set_name to 'Enchanted Longsword', then give me the canonical hash of the result.","exampleUseCases":[{"title":"Leveling up game asset traits","prompt":"I want to update my game character's NFT metadata for asset 'hero-007' — it currently has attributes strength:50 and level:3 — apply set_attribute strength to 80 and set_attribute level to 10, then give me the hash of the canonical result so I can verify it before any on-chain action."},{"title":"Cleaning deprecated metadata fields","prompt":"For asset 'armor-119' with attributes [{key:'legacy_id',value:'old_001'},{key:'defense',value:40}], apply a remove_attribute on 'legacy_id' and set_description to 'Titanium plate armor, Season 2 edition', and return the mutated metadata plus its canonical hash."},{"title":"Renaming and rebranding a digital collectible","prompt":"I need to rename my collectible asset 'card-555' — current name is 'Draft Card' and description is 'Placeholder' — set_name to 'Golden Foil Champion' and set_description to 'A rare holographic card from the 2024 championship series', then hash the result."}],"resultDescription":"Returns the mutated metadata object reflecting all applied operations in order (set_attribute, remove_attribute, set_name, set_description), along with a deterministic canonical hash of the final metadata state. No on-chain changes are made; the result is a pure in-memory transformation with a verifiable fingerprint.","failureModes":["Operations array is empty (minItems:1 violated) — returns validation error","Attribute key exceeds 128 characters — returns schema validation error","Metadata object missing required fields (name, description, attributes) — returns 400","Asset ID is blank or exceeds 256 characters — returns validation error","Operation references unknown op enum value — returns validation error","More than 1000 operations or attributes submitted — returns payload too large error","Malformed attribute value type not in [string, number, boolean, null] — returns type error"],"whenToPreferThis":"Choose this endpoint when you need to apply ordered mutations (add/remove attributes, rename, re-describe) to NFT or game asset metadata purely off-chain and want a deterministic canonical hash of the result for integrity verification, staging, or pre-commit diffing — without touching any blockchain, signing anything, or storing media. Prefer this over on-chain mutation tools when you want to preview or validate metadata transformations before committing them.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:40:54.623Z","isFirstParty":false}