/** * Ops Tool - MCP Server Diagnostics * * Provides health monitoring and connectivity testing for the MCP server itself. * This tool operates on the server infrastructure, not on user applications. * * **Use Cases:** * - Health checks for monitoring systems * - Connectivity testing during troubleshooting * - Resource usage monitoring (memory, CPU) * - Server diagnostics and metadata * * **NOT for:** * - Application containerization (use build-image-context, etc.) * - Docker operations (use Docker tools) * - Kubernetes operations (use K8s tools) * * @packageDocumentation */ import { type Result } from '../../types'; import type { ToolContext } from '../../core/context'; import type { z } from 'zod'; interface PingConfig { message?: string; } /** * Result of a ping operation. * * Uses a discriminant field `kind` to enable type-safe narrowing * when working with the OpsResult union type. */ export interface PingResult { /** * Discriminant field for type narrowing. * Always 'ping' for PingResult. */ readonly kind: 'ping'; /** * Natural language summary for user display. * 1-3 sentences describing the ping result. * @example "✅ Server is responsive. Ping successful at 2025-01-15T10:30:00Z." */ summary?: string; success: boolean; message: string; timestamp: string; server: { name: string; version: string; uptime: number; pid: number; }; capabilities: { tools: boolean; progress: boolean; }; } /** * Ping operation - test server connectivity * @public */ export declare function ping(config: PingConfig, context: ToolContext): Promise>; interface ServerStatusConfig { details?: boolean; workspacePath?: string; } /** * Result of a server status operation. * * Uses a discriminant field `kind` to enable type-safe narrowing * when working with the OpsResult union type. */ export interface ServerStatusResult { /** * Discriminant field for type narrowing. * Always 'status' for ServerStatusResult. */ readonly kind: 'status'; /** * Natural language summary for user display. * 1-3 sentences describing the server status. * @example "✅ Server healthy. Running for 2h 15m. Memory: 45% used, CPU: 4 cores." */ summary?: string; success: boolean; version: string; uptime: number; memory: { used: number; total: number; free: number; percentage: number; }; cpu: { model: string; cores: number; loadAverage: number[]; }; system: { platform: string; release: string; hostname: string; }; tools: { count: number; migrated: number; }; sessions?: number; policies?: { total: number; files: Array<{ path: string; source: string; }>; searchPaths: Array<{ path: string; source: string; exists: boolean; }>; }; } /** * Get server status * @public */ export declare function serverStatus(config: ServerStatusConfig, context: ToolContext): Promise>; /** @public */ export interface OpsConfig { operation: 'ping' | 'status'; message?: string; details?: boolean; } export type OpsResult = PingResult | ServerStatusResult; declare const _default: import("../../types").Tool; operation: z.ZodEnum<["ping", "status"]>; message: z.ZodOptional; details: z.ZodOptional; }, "strip", z.ZodTypeAny, { operation: "status" | "ping"; message?: string | undefined; workspacePath?: string | undefined; details?: boolean | undefined; }, { operation: "status" | "ping"; message?: string | undefined; workspacePath?: string | undefined; details?: boolean | undefined; }>, OpsResult>; export default _default; //# sourceMappingURL=tool.d.ts.map