UNPKG

@skyramp/mcp

Version:

Skyramp MCP (Model Context Protocol) Server - AI-powered test generation and execution

47 lines (45 loc) 1.4 kB
import { z } from "zod"; import { SkyrampClient } from "@skyramp/skyramp"; import { logger } from "../utils/logger.js"; export function registerLogoutTool(server) { server.registerTool("skyramp_logout", { description: `Logout from Skyramp platform Logout from Skyramp platform to end your authenticated session.`, inputSchema: { prompt: z .string() .describe("The prompt user provided to logout from Skyramp"), }, annotations: { keywords: ["logout", "sign out", "skyramp logout"], }, }, async (params) => { logger.info("Logging out from Skyramp", { prompt: params.prompt, }); const client = new SkyrampClient(); try { const result = await client.logout(); return { content: [ { type: "text", text: result, }, ], }; } catch (error) { const errorMessage = `Logout from Skyramp failed: ${error.message}`; return { content: [ { type: "text", text: errorMessage, }, ], isError: true, }; } }); }