UNPKG

mcp-server-logzio

Version:

Model Context Protocol server for Logz.io log management platform

162 lines 4.33 kB
import type { LogzioApiClient } from '../api/client.js'; import { type SearchLogsParams } from './search.js'; import { type QueryLogsParams } from './query.js'; import { type LogStatsParams } from './stats.js'; /** * All available MCP tools */ export declare const TOOLS: readonly [{ name: string; description: string; inputSchema: { type: string; properties: { query: { type: string; description: string; }; timeRange: { type: string; enum: string[]; description: string; }; from: { type: string; format: string; description: string; }; to: { type: string; format: string; description: string; }; logType: { type: string; description: string; }; severity: { type: string; enum: string[]; description: string; }; limit: { type: string; minimum: number; maximum: number; default: number; description: string; }; sort: { type: string; enum: string[]; default: string; description: string; }; }; required: string[]; }; }, { name: string; description: string; inputSchema: { type: string; properties: { luceneQuery: { type: string; description: string; }; from: { type: string; format: string; description: string; }; to: { type: string; format: string; description: string; }; size: { type: string; minimum: number; maximum: number; default: number; description: string; }; sort: { type: string; enum: string[]; default: string; description: string; }; }; required: string[]; }; }, { name: string; description: string; inputSchema: { type: string; properties: { timeRange: { type: string; enum: string[]; description: string; }; from: { type: string; format: string; description: string; }; to: { type: string; format: string; description: string; }; groupBy: { type: string; items: { type: string; }; description: string; }; }; required: never[]; }; }]; /** * Tool parameter types */ export type ToolParams = SearchLogsParams | QueryLogsParams | LogStatsParams; /** * Tool result type */ export type ToolResult = { content: Array<{ type: 'text'; text: string; }>; }; /** * Tool handler function type */ export type ToolHandler = (client: LogzioApiClient, params: unknown) => Promise<ToolResult>; /** * Tool registry mapping tool names to handlers */ export declare const TOOL_HANDLERS: Record<string, ToolHandler>; /** * Execute a tool by name with parameters */ export declare function executeTool(toolName: string, client: LogzioApiClient, params: unknown): Promise<ToolResult>; /** * Get all available tool names */ export declare function getToolNames(): string[]; /** * Check if a tool exists */ export declare function isValidTool(toolName: string): boolean; export { searchLogs, searchLogsTool, type SearchLogsParams, } from './search.js'; export { queryLogs, queryLogsTool, type QueryLogsParams, } from './query.js'; export { getLogStats, logStatsTool, type LogStatsParams, } from './stats.js'; //# sourceMappingURL=index.d.ts.map