// HUD's tools, called as the signed-in account through the appview's // callTool: what a tile draws, what the launcher lists, whose faces show. import type { ToolResult } from '@hud/shared/result'; import type * as callToolMethod from './lexicons/place/hud/callTool.defs.ts'; import { procedure } from './xrpc'; /** One of HUD's tools, called as the account: its result as `/mcp` gives it. */ export async function callTool(name: string, args: Record): Promise { const { result } = await procedure('place.hud.callTool', { name, arguments: args as callToolMethod.$InputBody['arguments'] }); return result as ToolResult; }