UNPKG

@turbot/tailpipe-mcp

Version:

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

32 lines 1.33 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_table_show", description: `Get detailed information about a specific Tailpipe table, including its schema, column definitions, data types, and descriptions.`, inputSchema: { type: "object", properties: { name: { type: "string", description: "Name of the table to show details for" } }, required: ["name"], additionalProperties: false }, handler: async (args) => { logger.debug('Executing table_show tool'); const cmd = buildTailpipeCommand(`table show ${args.name}`, { output: 'json' }); try { const output = executeCommand(cmd, { env: getTailpipeEnv() }); return validateAndFormat(output, cmd, 'table'); } catch (error) { logger.error('Failed to execute table_show tool:', error instanceof Error ? error.message : String(error)); return formatCommandError(error, cmd); } } }; //# sourceMappingURL=tailpipe_table_show.js.map