Skip to main content
Glama

Exa MCP Server

by joerup
types.ts3.71 kB
/** * Type definitions for Exa MCP Server */ /** * Custom error class for Exa API errors */ export class ExaError extends Error { public code?: string; public statusCode?: number; constructor(message: string, code?: string, statusCode?: number) { super(message); this.name = 'ExaError'; this.code = code; this.statusCode = statusCode; } } /** * Search result from Exa API */ export interface ExaSearchResult { id?: string; title: string; url: string; snippet?: string; publishedDate?: string; author?: string; score?: number; text?: string; highlights?: string[]; summary?: string; image?: string; favicon?: string; } /** * Company research results */ export interface CompanyResearchResults { overview?: ExaSearchResult[]; news?: ExaSearchResult[]; competitors?: ExaSearchResult[]; reviews?: ExaSearchResult[]; } /** * LinkedIn search results */ export interface LinkedInSearchResults { people?: ExaSearchResult[]; companies?: ExaSearchResult[]; } /** * Deep research task */ export interface DeepResearchTask { task_id: string; status: string; started_at?: string; completed_at?: string; results?: any; error?: string; } /** * Configuration for the server */ export interface ServerConfig { apiKey: string; port: number; enabledTools?: string[]; debug?: boolean; } // Exa API Types export interface ExaSearchRequest { query: string; type: string; category?: string; includeDomains?: string[]; excludeDomains?: string[]; startPublishedDate?: string; endPublishedDate?: string; numResults: number; contents: { text: { maxCharacters?: number; } | boolean; livecrawl?: 'always' | 'fallback' | 'preferred'; subpages?: number; subpageTarget?: string[]; }; } export interface ExaCrawlRequest { ids: string[]; text: boolean; livecrawl?: 'always' | 'fallback' | 'preferred'; } export interface ExaSearchResponse { requestId: string; autopromptString: string; resolvedSearchType: string; results: ExaSearchResult[]; } // Tool Types export interface SearchArgs { query: string; numResults?: number; livecrawl?: 'always' | 'fallback' | 'preferred'; } // Deep Research API Types export interface DeepResearchRequest { model: 'exa-research' | 'exa-research-pro'; instructions: string; output?: { inferSchema?: boolean; }; } export interface DeepResearchStartResponse { id: string; outputSchema?: { type: string; properties: any; required: string[]; additionalProperties: boolean; }; } export interface DeepResearchCheckResponse { id: string; createdAt: number; status: 'running' | 'completed' | 'failed'; instructions: string; schema?: { type: string; properties: any; required: string[]; additionalProperties: boolean; }; data?: { report?: string; [key: string]: any; }; operations?: Array<{ type: string; stepId: string; text?: string; query?: string; goal?: string; results?: any[]; url?: string; thought?: string; data?: any; }>; citations?: { [key: string]: Array<{ id: string; url: string; title: string; snippet: string; }>; }; timeMs?: number; model?: string; costDollars?: { total: number; research: { searches: number; pages: number; reasoningTokens: number; }; }; } export interface DeepResearchErrorResponse { response: { message: string; error: string; statusCode: number; }; status: number; options: any; message: string; name: string; }

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/joerup/exa-mcp'

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