UNPKG

@turbot/tailpipe-mcp

Version:

Tailpipe MCP server to query cloud and security logs using AI.

32 lines 1.34 kB
import { logger } from "../services/logger.js"; import { executeCommand, formatCommandError } from "../utils/command.js"; import { buildTailpipeCommand, getTailpipeEnv } from "../utils/tailpipe.js"; import { validateAndFormat } from "../utils/format.js"; export const tool = { name: "tailpipe_partition_show", description: "Get detailed information about a specific Tailpipe partition, including its configuration and statistics.", inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the partition to show details for" } }, required: ["name"], additionalProperties: false }, handler: async (args) => { logger.debug('Executing partition_show tool'); const cmd = buildTailpipeCommand(`partition show "${args.name}"`, { output: 'json' }); try { const output = executeCommand(cmd, { env: getTailpipeEnv() }); return validateAndFormat(output, cmd, 'partition'); } catch (error) { logger.error('Failed to execute partition_show tool:', error instanceof Error ? error.message : String(error)); return formatCommandError(error, cmd); } } }; //# sourceMappingURL=tailpipe_partition_show.js.map