Skip to main content
Glama

Chrome MCP Server

index.tsβ€’875 B
import { createErrorResponse } from '@/common/tool-handler'; import { ERROR_MESSAGES } from '@/common/constants'; import * as browserTools from './browser'; const tools = { ...browserTools }; const toolsMap = new Map(Object.values(tools).map((tool) => [tool.name, tool])); /** * Tool call parameter interface */ export interface ToolCallParam { name: string; args: any; } /** * Handle tool execution */ export const handleCallTool = async (param: ToolCallParam) => { const tool = toolsMap.get(param.name); if (!tool) { return createErrorResponse(`Tool ${param.name} not found`); } try { return await tool.execute(param.args); } catch (error) { console.error(`Tool execution failed for ${param.name}:`, error); return createErrorResponse( error instanceof Error ? error.message : ERROR_MESSAGES.TOOL_EXECUTION_FAILED, ); } };

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/marie6789040106650/mcp-chrome-bk'

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