Skip to main content
Glama

Brave Search MCP

BaseTool.ts674 B
import type { z } from 'zod'; export abstract class BaseTool<T extends z.ZodType, R> { public abstract readonly name: string; public abstract readonly description: string; public abstract readonly inputSchema: T; protected constructor() {} public abstract executeCore(input: z.infer<T>): Promise<R>; public async execute(input: z.infer<T>) { try { return await this.executeCore(input); } catch (error) { console.error(`Error executing ${this.name}:`, error); return { content: [{ type: 'text' as const, text: `Error in ${this.name}: ${error}`, }], isError: true, }; } } }

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/mikechao/brave-search-mcp'

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