/** * MCP Tool Schemas * * JSON schemas for all MCP tools exposed by the knowledge base server. * These schemas define input validation rules and output formats for each tool. * * Validates: Requirements 15.1 */ /** * Schema for list_knowledgebases tool * * Lists all indexed knowledge bases with their metadata. * No input parameters required. */ export declare const LIST_KNOWLEDGEBASES_SCHEMA: { readonly name: "list_knowledgebases"; readonly description: "List all indexed knowledge bases with their metadata including name, path, chunk count, file count, last ingestion timestamp, and document types."; readonly inputSchema: { readonly type: "object"; readonly properties: {}; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly knowledgebases: { readonly type: "array"; readonly description: "Array of all indexed knowledge bases"; readonly items: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Unique name of the knowledge base"; }; readonly path: { readonly type: "string"; readonly description: "File system path to the knowledge base directory"; }; readonly chunkCount: { readonly type: "number"; readonly description: "Total number of document chunks indexed"; readonly minimum: 0; }; readonly fileCount: { readonly type: "number"; readonly description: "Total number of files processed"; readonly minimum: 0; }; readonly lastIngestion: { readonly type: "string"; readonly description: "ISO 8601 timestamp of the last ingestion"; readonly format: "date-time"; }; }; readonly required: readonly ["name", "path", "chunkCount", "fileCount", "lastIngestion"]; readonly additionalProperties: false; }; }; }; readonly required: readonly ["knowledgebases"]; readonly additionalProperties: false; }; }; /** * Schema for search_knowledgebases tool * * Performs semantic search across indexed knowledge bases. * Accepts a query string and optional filters for knowledge base name, document type, and max results. */ export declare const SEARCH_KNOWLEDGEBASES_SCHEMA: { readonly name: "search_knowledgebases"; readonly description: "Search indexed knowledge bases using semantic search. Returns document chunks ranked by similarity to the query. Supports optional filters for knowledge base name, document type, and maximum number of results."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly query: { readonly type: "string"; readonly description: "Search query describing the content you want to find (e.g., \"project requirements\", \"meeting notes about Q4\")"; readonly minLength: 1; }; readonly knowledgebaseName: { readonly type: "string"; readonly description: "Optional filter to search only within a specific knowledge base"; }; readonly documentType: { readonly type: "string"; readonly description: "Optional filter to search only for documents of a specific type"; readonly enum: readonly ["pdf", "docx", "pptx", "xlsx", "html", "markdown", "text", "audio"]; }; readonly maxResults: { readonly type: "number"; readonly description: "Maximum number of results to return (default: 50)"; readonly minimum: 1; readonly maximum: 200; readonly default: 50; }; }; readonly required: readonly ["query"]; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly results: { readonly type: "array"; readonly description: "Array of search results ranked by similarity score"; readonly items: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Relative path to the file containing this document chunk"; }; readonly startLine: { readonly type: "number"; readonly description: "Starting line number of the chunk (1-indexed)"; readonly minimum: 1; }; readonly endLine: { readonly type: "number"; readonly description: "Ending line number of the chunk (1-indexed)"; readonly minimum: 1; }; readonly documentType: { readonly type: "string"; readonly description: "Document type of the chunk"; readonly enum: readonly ["pdf", "docx", "pptx", "xlsx", "html", "markdown", "text", "audio"]; }; readonly chunkType: { readonly type: "string"; readonly description: "Type of document chunk (paragraph, section, table, heading, list, code)"; }; readonly content: { readonly type: "string"; readonly description: "The actual content of the chunk"; }; readonly similarityScore: { readonly type: "number"; readonly description: "Similarity score between 0 and 1 (higher is more similar)"; readonly minimum: 0; readonly maximum: 1; }; readonly knowledgebaseName: { readonly type: "string"; readonly description: "Name of the knowledge base containing this chunk"; }; }; readonly required: readonly ["filePath", "startLine", "endLine", "documentType", "chunkType", "content", "similarityScore", "knowledgebaseName"]; readonly additionalProperties: false; }; }; readonly totalResults: { readonly type: "number"; readonly description: "Total number of results found (may be greater than results returned)"; readonly minimum: 0; }; readonly queryTime: { readonly type: "number"; readonly description: "Time taken to execute the query in milliseconds"; readonly minimum: 0; }; }; readonly required: readonly ["results", "totalResults", "queryTime"]; readonly additionalProperties: false; }; }; /** * Schema for get_knowledgebase_stats tool * * Retrieves detailed statistics for a specific knowledge base. * Requires the knowledge base name as input. */ export declare const GET_KNOWLEDGEBASE_STATS_SCHEMA: { readonly name: "get_knowledgebase_stats"; readonly description: "Get detailed statistics for a specific knowledge base including chunk count, file count, document type distribution, chunk type distribution, and storage size."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Name of the knowledge base to retrieve statistics for"; readonly minLength: 1; }; }; readonly required: readonly ["name"]; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Name of the knowledge base"; }; readonly path: { readonly type: "string"; readonly description: "File system path to the knowledge base directory"; }; readonly chunkCount: { readonly type: "number"; readonly description: "Total number of document chunks indexed"; readonly minimum: 0; }; readonly fileCount: { readonly type: "number"; readonly description: "Total number of files processed"; readonly minimum: 0; }; readonly lastIngestion: { readonly type: "string"; readonly description: "ISO 8601 timestamp of the last ingestion"; readonly format: "date-time"; }; readonly documentTypes: { readonly type: "array"; readonly description: "Document type distribution statistics"; readonly items: { readonly type: "object"; readonly properties: { readonly documentType: { readonly type: "string"; readonly description: "Document type name"; }; readonly fileCount: { readonly type: "number"; readonly description: "Number of files of this type"; readonly minimum: 0; }; readonly chunkCount: { readonly type: "number"; readonly description: "Number of chunks of this type"; readonly minimum: 0; }; }; readonly required: readonly ["documentType", "fileCount", "chunkCount"]; readonly additionalProperties: false; }; }; readonly chunkTypes: { readonly type: "array"; readonly description: "Chunk type distribution statistics"; readonly items: { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly description: "Type of document chunk"; }; readonly count: { readonly type: "number"; readonly description: "Number of chunks of this type"; readonly minimum: 0; }; }; readonly required: readonly ["type", "count"]; readonly additionalProperties: false; }; }; readonly sizeBytes: { readonly type: "number"; readonly description: "Total size of all document chunks in bytes"; readonly minimum: 0; }; }; readonly required: readonly ["name", "path", "chunkCount", "fileCount", "lastIngestion", "documentTypes", "chunkTypes", "sizeBytes"]; readonly additionalProperties: false; }; }; /** * Schema for open_knowledgebase_manager tool * * Opens the web-based knowledge base manager UI in the default browser. * No input parameters required. */ export declare const OPEN_KNOWLEDGEBASE_MANAGER_SCHEMA: { readonly name: "open_knowledgebase_manager"; readonly description: "Open the web-based knowledge base manager UI in the default browser. The manager provides a visual interface for viewing knowledge base statistics, renaming knowledge bases, and deleting knowledge bases."; readonly inputSchema: { readonly type: "object"; readonly properties: {}; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly url: { readonly type: "string"; readonly description: "URL of the manager UI (e.g., \"http://localhost:8009\")"; readonly format: "uri"; }; readonly message: { readonly type: "string"; readonly description: "Status message about the operation"; }; }; readonly required: readonly ["url", "message"]; readonly additionalProperties: false; }; }; /** * Type definitions for tool inputs and outputs */ export interface ListKnowledgebasesInput { } export interface ListKnowledgebasesOutput { knowledgebases: Array<{ name: string; path: string; chunkCount: number; fileCount: number; lastIngestion: string; }>; } export interface SearchKnowledgebasesInput { query: string; knowledgebaseName?: string; documentType?: 'pdf' | 'docx' | 'pptx' | 'xlsx' | 'html' | 'markdown' | 'text' | 'audio'; maxResults?: number; } export interface SearchKnowledgebasesOutput { results: Array<{ filePath: string; startLine: number; endLine: number; documentType: string; chunkType: string; content: string; similarityScore: number; knowledgebaseName: string; }>; totalResults: number; queryTime: number; } export interface GetKnowledgebaseStatsInput { name: string; } export interface GetKnowledgebaseStatsOutput { name: string; path: string; chunkCount: number; fileCount: number; lastIngestion: string; documentTypes: Array<{ documentType: string; fileCount: number; chunkCount: number; }>; chunkTypes: Array<{ type: string; count: number; }>; sizeBytes: number; } export interface OpenKnowledgebaseManagerInput { } export interface OpenKnowledgebaseManagerOutput { url: string; message: string; } /** * Schema for list_documents tool * * Lists all documents in a specific knowledge base. */ export declare const LIST_DOCUMENTS_SCHEMA: { readonly name: "list_documents"; readonly description: "List all documents in a knowledge base with their metadata including file path, document type, chunk count, last ingestion timestamp, and size."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly knowledgebaseName: { readonly type: "string"; readonly description: "Name of the knowledge base to list documents from"; readonly minLength: 1; }; }; readonly required: readonly ["knowledgebaseName"]; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly documents: { readonly type: "array"; readonly description: "Array of all documents in the knowledge base"; readonly items: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Relative path to the document file"; }; readonly documentType: { readonly type: "string"; readonly description: "Type of the document"; readonly enum: readonly ["pdf", "docx", "pptx", "xlsx", "html", "markdown", "text", "audio"]; }; readonly chunkCount: { readonly type: "number"; readonly description: "Number of chunks for this document"; readonly minimum: 0; }; readonly lastIngestion: { readonly type: "string"; readonly description: "ISO 8601 timestamp of when this document was last ingested"; readonly format: "date-time"; }; readonly sizeBytes: { readonly type: "number"; readonly description: "Total size of all chunks in bytes"; readonly minimum: 0; }; }; readonly required: readonly ["filePath", "documentType", "chunkCount", "lastIngestion", "sizeBytes"]; readonly additionalProperties: false; }; }; readonly knowledgebaseName: { readonly type: "string"; readonly description: "Name of the knowledge base"; }; readonly totalDocuments: { readonly type: "number"; readonly description: "Total number of documents"; readonly minimum: 0; }; }; readonly required: readonly ["documents", "knowledgebaseName", "totalDocuments"]; readonly additionalProperties: false; }; }; export interface ListDocumentsInput { knowledgebaseName: string; } export interface ListDocumentsOutput { documents: Array<{ filePath: string; documentType: string; chunkCount: number; lastIngestion: string; sizeBytes: number; }>; knowledgebaseName: string; totalDocuments: number; } /** * All tool schemas exported as an array for easy registration */ export declare const ALL_TOOL_SCHEMAS: readonly [{ readonly name: "list_knowledgebases"; readonly description: "List all indexed knowledge bases with their metadata including name, path, chunk count, file count, last ingestion timestamp, and document types."; readonly inputSchema: { readonly type: "object"; readonly properties: {}; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly knowledgebases: { readonly type: "array"; readonly description: "Array of all indexed knowledge bases"; readonly items: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Unique name of the knowledge base"; }; readonly path: { readonly type: "string"; readonly description: "File system path to the knowledge base directory"; }; readonly chunkCount: { readonly type: "number"; readonly description: "Total number of document chunks indexed"; readonly minimum: 0; }; readonly fileCount: { readonly type: "number"; readonly description: "Total number of files processed"; readonly minimum: 0; }; readonly lastIngestion: { readonly type: "string"; readonly description: "ISO 8601 timestamp of the last ingestion"; readonly format: "date-time"; }; }; readonly required: readonly ["name", "path", "chunkCount", "fileCount", "lastIngestion"]; readonly additionalProperties: false; }; }; }; readonly required: readonly ["knowledgebases"]; readonly additionalProperties: false; }; }, { readonly name: "search_knowledgebases"; readonly description: "Search indexed knowledge bases using semantic search. Returns document chunks ranked by similarity to the query. Supports optional filters for knowledge base name, document type, and maximum number of results."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly query: { readonly type: "string"; readonly description: "Search query describing the content you want to find (e.g., \"project requirements\", \"meeting notes about Q4\")"; readonly minLength: 1; }; readonly knowledgebaseName: { readonly type: "string"; readonly description: "Optional filter to search only within a specific knowledge base"; }; readonly documentType: { readonly type: "string"; readonly description: "Optional filter to search only for documents of a specific type"; readonly enum: readonly ["pdf", "docx", "pptx", "xlsx", "html", "markdown", "text", "audio"]; }; readonly maxResults: { readonly type: "number"; readonly description: "Maximum number of results to return (default: 50)"; readonly minimum: 1; readonly maximum: 200; readonly default: 50; }; }; readonly required: readonly ["query"]; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly results: { readonly type: "array"; readonly description: "Array of search results ranked by similarity score"; readonly items: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Relative path to the file containing this document chunk"; }; readonly startLine: { readonly type: "number"; readonly description: "Starting line number of the chunk (1-indexed)"; readonly minimum: 1; }; readonly endLine: { readonly type: "number"; readonly description: "Ending line number of the chunk (1-indexed)"; readonly minimum: 1; }; readonly documentType: { readonly type: "string"; readonly description: "Document type of the chunk"; readonly enum: readonly ["pdf", "docx", "pptx", "xlsx", "html", "markdown", "text", "audio"]; }; readonly chunkType: { readonly type: "string"; readonly description: "Type of document chunk (paragraph, section, table, heading, list, code)"; }; readonly content: { readonly type: "string"; readonly description: "The actual content of the chunk"; }; readonly similarityScore: { readonly type: "number"; readonly description: "Similarity score between 0 and 1 (higher is more similar)"; readonly minimum: 0; readonly maximum: 1; }; readonly knowledgebaseName: { readonly type: "string"; readonly description: "Name of the knowledge base containing this chunk"; }; }; readonly required: readonly ["filePath", "startLine", "endLine", "documentType", "chunkType", "content", "similarityScore", "knowledgebaseName"]; readonly additionalProperties: false; }; }; readonly totalResults: { readonly type: "number"; readonly description: "Total number of results found (may be greater than results returned)"; readonly minimum: 0; }; readonly queryTime: { readonly type: "number"; readonly description: "Time taken to execute the query in milliseconds"; readonly minimum: 0; }; }; readonly required: readonly ["results", "totalResults", "queryTime"]; readonly additionalProperties: false; }; }, { readonly name: "get_knowledgebase_stats"; readonly description: "Get detailed statistics for a specific knowledge base including chunk count, file count, document type distribution, chunk type distribution, and storage size."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Name of the knowledge base to retrieve statistics for"; readonly minLength: 1; }; }; readonly required: readonly ["name"]; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly name: { readonly type: "string"; readonly description: "Name of the knowledge base"; }; readonly path: { readonly type: "string"; readonly description: "File system path to the knowledge base directory"; }; readonly chunkCount: { readonly type: "number"; readonly description: "Total number of document chunks indexed"; readonly minimum: 0; }; readonly fileCount: { readonly type: "number"; readonly description: "Total number of files processed"; readonly minimum: 0; }; readonly lastIngestion: { readonly type: "string"; readonly description: "ISO 8601 timestamp of the last ingestion"; readonly format: "date-time"; }; readonly documentTypes: { readonly type: "array"; readonly description: "Document type distribution statistics"; readonly items: { readonly type: "object"; readonly properties: { readonly documentType: { readonly type: "string"; readonly description: "Document type name"; }; readonly fileCount: { readonly type: "number"; readonly description: "Number of files of this type"; readonly minimum: 0; }; readonly chunkCount: { readonly type: "number"; readonly description: "Number of chunks of this type"; readonly minimum: 0; }; }; readonly required: readonly ["documentType", "fileCount", "chunkCount"]; readonly additionalProperties: false; }; }; readonly chunkTypes: { readonly type: "array"; readonly description: "Chunk type distribution statistics"; readonly items: { readonly type: "object"; readonly properties: { readonly type: { readonly type: "string"; readonly description: "Type of document chunk"; }; readonly count: { readonly type: "number"; readonly description: "Number of chunks of this type"; readonly minimum: 0; }; }; readonly required: readonly ["type", "count"]; readonly additionalProperties: false; }; }; readonly sizeBytes: { readonly type: "number"; readonly description: "Total size of all document chunks in bytes"; readonly minimum: 0; }; }; readonly required: readonly ["name", "path", "chunkCount", "fileCount", "lastIngestion", "documentTypes", "chunkTypes", "sizeBytes"]; readonly additionalProperties: false; }; }, { readonly name: "open_knowledgebase_manager"; readonly description: "Open the web-based knowledge base manager UI in the default browser. The manager provides a visual interface for viewing knowledge base statistics, renaming knowledge bases, and deleting knowledge bases."; readonly inputSchema: { readonly type: "object"; readonly properties: {}; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly url: { readonly type: "string"; readonly description: "URL of the manager UI (e.g., \"http://localhost:8009\")"; readonly format: "uri"; }; readonly message: { readonly type: "string"; readonly description: "Status message about the operation"; }; }; readonly required: readonly ["url", "message"]; readonly additionalProperties: false; }; }, { readonly name: "list_documents"; readonly description: "List all documents in a knowledge base with their metadata including file path, document type, chunk count, last ingestion timestamp, and size."; readonly inputSchema: { readonly type: "object"; readonly properties: { readonly knowledgebaseName: { readonly type: "string"; readonly description: "Name of the knowledge base to list documents from"; readonly minLength: 1; }; }; readonly required: readonly ["knowledgebaseName"]; readonly additionalProperties: false; }; readonly outputSchema: { readonly type: "object"; readonly properties: { readonly documents: { readonly type: "array"; readonly description: "Array of all documents in the knowledge base"; readonly items: { readonly type: "object"; readonly properties: { readonly filePath: { readonly type: "string"; readonly description: "Relative path to the document file"; }; readonly documentType: { readonly type: "string"; readonly description: "Type of the document"; readonly enum: readonly ["pdf", "docx", "pptx", "xlsx", "html", "markdown", "text", "audio"]; }; readonly chunkCount: { readonly type: "number"; readonly description: "Number of chunks for this document"; readonly minimum: 0; }; readonly lastIngestion: { readonly type: "string"; readonly description: "ISO 8601 timestamp of when this document was last ingested"; readonly format: "date-time"; }; readonly sizeBytes: { readonly type: "number"; readonly description: "Total size of all chunks in bytes"; readonly minimum: 0; }; }; readonly required: readonly ["filePath", "documentType", "chunkCount", "lastIngestion", "sizeBytes"]; readonly additionalProperties: false; }; }; readonly knowledgebaseName: { readonly type: "string"; readonly description: "Name of the knowledge base"; }; readonly totalDocuments: { readonly type: "number"; readonly description: "Total number of documents"; readonly minimum: 0; }; }; readonly required: readonly ["documents", "knowledgebaseName", "totalDocuments"]; readonly additionalProperties: false; }; }]; //# sourceMappingURL=tool-schemas.d.ts.map