UNPKG

onyx-mcp-server

Version:

Model Context Protocol (MCP) server for seamless integration with Onyx AI knowledge bases

158 lines (157 loc) 3.76 kB
/** * Type definitions for the Onyx MCP Server */ /** * Onyx search result interface */ export interface OnyxSearchResult { document_id: string; chunk_ind: number; semantic_identifier: string; link?: string; blurb: string; source_type: string; score: number; match_highlights?: string[]; } /** * Onyx document interface */ export interface OnyxDocument { document_id: string; semantic_identifier: string; } /** * Document information interface */ export interface DocumentInfo { num_chunks: number; num_tokens: number; } /** * Chunk information interface */ export interface ChunkInfo { content: string; num_tokens: number; } /** * Configuration for the Onyx server */ export interface OnyxConfig { apiUrl: string; apiToken: string; } /** * Search parameters interface */ export interface SearchParams { query: string; documentSets?: string[]; maxResults?: number; chunksAbove?: number; chunksBelow?: number; retrieveFullDocuments?: boolean; } /** * Chat parameters interface */ export interface ChatParams { query: string; personaId?: number; documentSets?: string[]; enableAutoDetectFilters?: boolean; chatSessionId?: string | null; } /** * Chat content response interface */ export interface ChatContentResponse { type: string; text: string; metadata?: { chat_session_id: string; }; } /** * Tool schemas for MCP */ export declare const toolSchemas: { search_onyx: { name: string; description: string; inputSchema: { type: string; properties: { query: { type: string; description: string; }; chunksAbove: { type: string; description: string; default: number; }; chunksBelow: { type: string; description: string; default: number; }; retrieveFullDocuments: { type: string; description: string; default: boolean; }; documentSets: { type: string; items: { type: string; }; description: string; }; maxResults: { type: string; description: string; minimum: number; maximum: number; }; }; required: string[]; }; }; chat_with_onyx: { name: string; description: string; inputSchema: { type: string; properties: { query: { type: string; description: string; }; personaId: { type: string; description: string; default: number; }; chatSessionId: { type: string; description: string; }; documentSets: { type: string; items: { type: string; }; description: string; }; enableAutoDetectFilters: { type: string; description: string; default: boolean; }; }; required: string[]; }; }; };