Skip to main content
Glama
toolsRoutes.ts1.32 kB
import { Router } from 'express'; import { ToolsController } from '../controllers/ToolsController'; import { ToolRegistry } from '../tools/ToolRegistry'; const router = Router(); const toolRegistry = new ToolRegistry(); const toolsController = new ToolsController(toolRegistry); /** * List all available tools * @route GET /tools * @group Tools - Custom tool operations * @returns {object} 200 - List of tools * @returns {Error} 500 - Server error */ router.get('/', (req, res) => toolsController.listTools(req, res)); /** * Get tool information * @route GET /tools/{toolName} * @group Tools - Custom tool operations * @param {string} toolName.path.required - Tool name * @returns {object} 200 - Tool information * @returns {Error} 404 - Tool not found * @returns {Error} 500 - Server error */ router.get('/:toolName', (req, res) => toolsController.getTool(req, res)); /** * Execute a tool * @route POST /tools/{toolName}/execute * @group Tools - Custom tool operations * @param {string} toolName.path.required - Tool name * @param {object} args.body - Tool arguments * @returns {object} 200 - Tool result * @returns {Error} 404 - Tool not found * @returns {Error} 500 - Server error */ router.post('/:toolName/execute', (req, res) => toolsController.executeTool(req, res)); export default router;

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/Nom-nom-hub/fullstack-mcp'

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