Skip to main content
Glama

AI Note MCP Server

by ainote-dev
tool-registry.js•659 B
export class ToolRegistry { constructor() { this.tools = new Map(); } register(tool) { if (!tool?.definition?.name) { throw new Error('Invalid tool registration: missing tool name'); } this.tools.set(tool.definition.name, tool); } registerMany(tools = []) { tools.forEach((tool) => this.register(tool)); } listDefinitions() { return Array.from(this.tools.values()).map((tool) => tool.definition); } async execute(name, args, context) { const tool = this.tools.get(name); if (!tool) { throw new Error(`Unknown tool: ${name}`); } return tool.handler(args ?? {}, context ?? {}); } }

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/ainote-dev/ainote-mcp'

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