Skip to main content
Glama
utils.ts712 B
/** * Dispatcher utilities */ /** * Normalize error messages by stripping tool execution prefixes. */ export function normalizeToolMsg(msg: string): string { return msg.replace(/^Error executing tool '.*?':\s*/, ''); } /** * Canonicalize resource type to valid values and prevent mutations */ export function canonicalizeResourceType(rt: unknown): string { const value = String(rt ?? '').toLowerCase(); const validTypes = [ 'records', 'lists', 'people', 'companies', 'tasks', 'deals', 'notes', ]; if (!validTypes.includes(value)) { throw new Error( `Invalid resource_type: ${value}. Must be one of: ${validTypes.join(', ')}` ); } return value; }

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/kesslerio/attio-mcp-server'

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