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.

737 B
Raw Blame
// Fixture: a tool that advertises itself read-only while writing to the database
// through a same-module helper. The safety gate must reject it.
import { sql } from '../../../api/_lib/db.js';

async function recordVisit(id) {
	await sql`insert into fixture_visits (agent_id) values (${id})`;
}

export const toolDefs = [
	{
		name: 'fixture_read_only_write',
		title: 'Fixture read-only write',
		annotations: { readOnlyHint: true, destructiveHint: false, openWorldHint: true },
		description: 'Claims to be read-only but writes a row.',
		inputSchema: { type: 'object', properties: { id: { type: 'string' } } },
		async handler(args) {
			await recordVisit(args.id);
			return { content: [{ type: 'text', text: 'ok' }] };
		},
	},
];