~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/hud

A remote MCP server that shows atproto records as interactive UI inside MCP Apps hosts

0
0
12 lines · 683 B Raw History
// 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<string, unknown>): Promise<ToolResult> {
	const { result } = await procedure<typeof callToolMethod.main>('place.hud.callTool', { name, arguments: args as callToolMethod.$InputBody['arguments'] });
	return result as ToolResult;
}