Skip to main content
Glama
tool-metadata.ts1.24 kB
/** * Tool Metadata Types for Dynamic Loader Pattern * Enables search_tools discovery and load_tool_schema on-demand loading */ export type ToolCategory = | 'world' | 'combat' | 'character' | 'inventory' | 'quest' | 'party' | 'math' | 'strategy' | 'secret' | 'concentration' | 'rest' | 'scroll' | 'aura' | 'npc' | 'spatial' | 'theft' | 'corpse' | 'improvisation' | 'turn-management' | 'meta' | 'batch' | 'context' | 'narrative' | 'composite'; export type TokenCost = 'low' | 'medium' | 'high' | 'variable'; export interface ToolMetadata { name: string; description: string; category: ToolCategory; keywords: string[]; capabilities: string[]; contextAware: boolean; estimatedTokenCost: TokenCost; usageExample: string; /** If true, tool is only loaded when discovered via search_tools (MCP spec) */ deferLoading: boolean; } export interface ToolRegistryEntry { metadata: ToolMetadata; schema: any; // Zod schema handler: Function; } export interface ToolRegistry { [toolName: string]: ToolRegistryEntry; } // Minimal schema for MCP registration - empty shape, validation happens in handler // The MCP SDK expects Zod schema shapes, so we export an empty object export const MINIMAL_SCHEMA = {};

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Mnehmos/rpg-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server