UNPKG

@takashito/linode-mcp-server

Version:

MCP server for Linode API

109 lines 4.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getLongviewDataSchema = exports.LongviewDataSchema = exports.getLongviewSubscriptionSchema = exports.listLongviewSubscriptionsSchema = exports.LongviewSubscriptionSchema = exports.deleteLongviewClientSchema = exports.updateLongviewClientSchema = exports.createLongviewClientSchema = exports.getLongviewClientSchema = exports.listLongviewClientsSchema = exports.LongviewClientSchema = void 0; const zod_1 = require("zod"); // Longview Client schemas exports.LongviewClientSchema = zod_1.z.object({ id: zod_1.z.number(), label: zod_1.z.string(), api_key: zod_1.z.string(), install_code: zod_1.z.string(), apps: zod_1.z.object({ apache: zod_1.z.boolean(), nginx: zod_1.z.boolean(), mysql: zod_1.z.boolean() }), created: zod_1.z.string(), updated: zod_1.z.string() }); // List clients schema exports.listLongviewClientsSchema = zod_1.z.object({ page: zod_1.z.number().optional().describe('Page number of results to return.'), page_size: zod_1.z.number().optional().describe('Number of results to return per page.') }); // Get client schema exports.getLongviewClientSchema = zod_1.z.object({ id: zod_1.z.number().describe('ID of the Longview client to retrieve') }); // Create client schema exports.createLongviewClientSchema = zod_1.z.object({ label: zod_1.z.string().optional().describe('Label for the Longview client') }); // Update client schema exports.updateLongviewClientSchema = zod_1.z.object({ id: zod_1.z.number().describe('ID of the Longview client to update'), label: zod_1.z.string().describe('New label for the Longview client') }); // Delete client schema exports.deleteLongviewClientSchema = zod_1.z.object({ id: zod_1.z.number().describe('ID of the Longview client to delete') }); // Longview Subscription schemas exports.LongviewSubscriptionSchema = zod_1.z.object({ id: zod_1.z.string(), label: zod_1.z.string(), clients_included: zod_1.z.number(), price: zod_1.z.object({ hourly: zod_1.z.number(), monthly: zod_1.z.number() }) }); // List subscriptions schema exports.listLongviewSubscriptionsSchema = zod_1.z.object({ page: zod_1.z.number().optional().describe('Page number of results to return.'), page_size: zod_1.z.number().optional().describe('Number of results to return per page.') }); // Get subscription schema exports.getLongviewSubscriptionSchema = zod_1.z.object({ id: zod_1.z.string().describe('ID of the Longview subscription to retrieve') }); // Longview Data schemas exports.LongviewDataSchema = zod_1.z.object({ timestamp: zod_1.z.number(), uptime: zod_1.z.number(), packages: zod_1.z.object({ updates: zod_1.z.number() }), load: zod_1.z.tuple([zod_1.z.number(), zod_1.z.number(), zod_1.z.number()]), cpu: zod_1.z.object({ user: zod_1.z.number(), nice: zod_1.z.number(), system: zod_1.z.number(), wait: zod_1.z.number(), idle: zod_1.z.number() }), memory: zod_1.z.object({ total: zod_1.z.number(), used: zod_1.z.number(), free: zod_1.z.number(), buffers: zod_1.z.number(), cached: zod_1.z.number(), swap_total: zod_1.z.number(), swap_used: zod_1.z.number(), swap_free: zod_1.z.number() }), network: zod_1.z.record(zod_1.z.object({ rx_bytes: zod_1.z.number(), tx_bytes: zod_1.z.number(), rx_packets: zod_1.z.number(), tx_packets: zod_1.z.number() })), disk: zod_1.z.record(zod_1.z.object({ fs: zod_1.z.string(), mount_point: zod_1.z.string(), total: zod_1.z.number(), used: zod_1.z.number(), free: zod_1.z.number() })), processes: zod_1.z.record(zod_1.z.object({ user: zod_1.z.string(), count: zod_1.z.number(), cpu: zod_1.z.number(), mem: zod_1.z.number() })) }); // Get data schema exports.getLongviewDataSchema = zod_1.z.object({ id: zod_1.z.number().describe('ID of the Longview client to get data from') }); //# sourceMappingURL=schemas.js.map