Skip to main content
Glama

OpenAI MCP Server

by bhjo0930
base-tool.ts650 B
import { z } from 'zod'; export interface ToolDefinition { name: string; description: string; inputSchema: z.ZodSchema<any>; } export interface ToolResponse { content: Array<{ type: 'text'; text: string; }>; } export abstract class BaseTool { abstract readonly definition: ToolDefinition; abstract execute(args: any): Promise<ToolResponse>; protected createSuccessResponse(text: string): ToolResponse { return { content: [{ type: 'text', text }] }; } protected createErrorResponse(error: string): ToolResponse { return { content: [{ type: 'text', text: `Error: ${error}` }] }; } }

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/bhjo0930/openai_mcp'

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