Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

990 B
Raw Blame
import { z } from 'zod';
import { decodeDataUri, mediaMetadata } from '../lib/media.js';

export const def = {
	name: 'decode_solana_memo_data_uri',
	title: 'Decode a Solana memo data URI',
	annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
	description: 'Decode and validate one base64 image data URI from a Solana memo. Only PNG, JPEG, WebP, and GIF are accepted. The bytes stay local to the MCP process, are checked against their claimed file signature, and return inline as an MCP image with byte length, SHA-256, and dimensions when available. Use this when you already hold a data URI string; to pull media from a transaction call extract_solana_memo_media instead.',
	inputSchema: { dataUri: z.string().min(1).max(400_000).describe('A complete base64 image data URI from an SPL Memo instruction.') },
	async handler(args) {
		const media = decodeDataUri(args.dataUri);
		return { media, metadata: mediaMetadata(media) };
	},
};