Skip to main content
Glama
registry.js593 B
/** * 工具注册表实现 */ export class DefaultToolRegistry { handlers = new Map(); register(handler) { if (this.handlers.has(handler.name)) { throw new Error(`Tool '${handler.name}' is already registered`); } this.handlers.set(handler.name, handler); } get(name) { return this.handlers.get(name); } getAll() { return Array.from(this.handlers.values()); } has(name) { return this.handlers.has(name); } clear() { this.handlers.clear(); } } //# sourceMappingURL=registry.js.map

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/porkll/siyuan-mcp'

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