@takashito/linode-mcp-server
Version:
MCP server for Linode API
96 lines • 6.64 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getZoneFileSchema = exports.cloneDomainSchema = exports.importZoneSchema = exports.deleteDomainRecordSchema = exports.updateDomainRecordSchema = exports.createDomainRecordSchema = exports.getDomainRecordSchema = exports.listDomainRecordsSchema = exports.deleteDomainSchema = exports.updateDomainSchema = exports.createDomainSchema = exports.getDomainSchema = exports.listDomainsSchema = void 0;
const zod_1 = require("zod");
const schemas_1 = require("../common/schemas");
// Domain tools schemas
exports.listDomainsSchema = zod_1.z.object({
...schemas_1.pagingParamsSchema.shape
});
exports.getDomainSchema = zod_1.z.object({
id: zod_1.z.number().describe('The ID of the domain')
});
exports.createDomainSchema = zod_1.z.object({
domain: zod_1.z.string().describe('The domain name. For example: example.com'),
type: zod_1.z.enum(['master', 'slave']).describe('The type of domain (master or slave)'),
soa_email: zod_1.z.string().optional().describe('Start of Authority (SOA) email address. Required for master domains.'),
master_ips: zod_1.z.array(zod_1.z.string()).optional().describe('The IP addresses of the master DNS servers. Required for slave domains.'),
description: zod_1.z.string().optional().describe('A description for this domain'),
axfr_ips: zod_1.z.array(zod_1.z.string()).optional().describe('The list of IPs allowed to AXFR the entire domain'),
ttl_sec: zod_1.z.number().optional().describe('Time to Live (TTL) for the domain, in seconds'),
refresh_sec: zod_1.z.number().optional().describe('The refresh interval for the domain, in seconds'),
retry_sec: zod_1.z.number().optional().describe('The retry interval for the domain, in seconds'),
expire_sec: zod_1.z.number().optional().describe('The expiry time for the domain, in seconds'),
tags: schemas_1.tagsSchema
});
exports.updateDomainSchema = zod_1.z.object({
id: zod_1.z.number().describe('The ID of the domain'),
domain: zod_1.z.string().optional().describe('The domain name'),
type: zod_1.z.enum(['master', 'slave']).optional().describe('The type of domain (master or slave)'),
soa_email: zod_1.z.string().optional().describe('Start of Authority (SOA) email address'),
master_ips: zod_1.z.array(zod_1.z.string()).optional().describe('The IP addresses of the master DNS servers'),
description: zod_1.z.string().optional().describe('A description for this domain'),
axfr_ips: zod_1.z.array(zod_1.z.string()).optional().describe('The list of IPs allowed to AXFR the entire domain'),
ttl_sec: zod_1.z.number().optional().describe('Time to Live (TTL) for the domain, in seconds'),
refresh_sec: zod_1.z.number().optional().describe('The refresh interval for the domain, in seconds'),
retry_sec: zod_1.z.number().optional().describe('The retry interval for the domain, in seconds'),
expire_sec: zod_1.z.number().optional().describe('The expiry time for the domain, in seconds'),
status: zod_1.z.enum(['active', 'disabled', 'edit_mode', 'has_errors']).optional().describe('The status of the domain'),
tags: schemas_1.tagsSchema
});
exports.deleteDomainSchema = zod_1.z.object({
id: zod_1.z.number().describe('The ID of the domain')
});
// Domain record schemas
exports.listDomainRecordsSchema = zod_1.z.object({
id: zod_1.z.number().describe('The ID of the domain'),
...schemas_1.pagingParamsSchema.shape
});
exports.getDomainRecordSchema = zod_1.z.object({
domainId: zod_1.z.number().describe('The ID of the domain'),
recordId: zod_1.z.number().describe('The ID of the record')
});
exports.createDomainRecordSchema = zod_1.z.object({
domainId: zod_1.z.number().describe('The ID of the domain'),
name: zod_1.z.string().describe('The name of this record, relative to the domain (e.g., "www" for www.example.com)'),
target: zod_1.z.string().describe('The target for this record (e.g., the IP address for an A record)'),
type: zod_1.z.string().describe('The type of record (A, AAAA, CAA, CNAME, MX, NS, SRV, TXT)'),
priority: zod_1.z.number().optional().describe('The priority of this record (required for MX and SRV records)'),
weight: zod_1.z.number().optional().describe('The weight for this record (required for SRV records)'),
port: zod_1.z.number().optional().describe('The port this record points to (required for SRV records)'),
service: zod_1.z.string().optional().describe('The service this record identifies (required for SRV records)'),
protocol: zod_1.z.string().optional().describe('The protocol this record uses (required for SRV records)'),
ttl_sec: zod_1.z.number().optional().describe('Time to Live (TTL) for this record, in seconds'),
tag: zod_1.z.string().optional().describe('The tag for CAA records')
});
exports.updateDomainRecordSchema = zod_1.z.object({
domainId: zod_1.z.number().describe('The ID of the domain'),
recordId: zod_1.z.number().describe('The ID of the record'),
name: zod_1.z.string().optional().describe('The name of this record, relative to the domain'),
target: zod_1.z.string().optional().describe('The target for this record'),
priority: zod_1.z.number().optional().describe('The priority of this record'),
weight: zod_1.z.number().optional().describe('The weight for this record'),
port: zod_1.z.number().optional().describe('The port this record points to'),
service: zod_1.z.string().optional().describe('The service this record identifies'),
protocol: zod_1.z.string().optional().describe('The protocol this record uses'),
ttl_sec: zod_1.z.number().optional().describe('Time to Live (TTL) for this record, in seconds'),
tag: zod_1.z.string().optional().describe('The tag for CAA records')
});
exports.deleteDomainRecordSchema = zod_1.z.object({
domainId: zod_1.z.number().describe('The ID of the domain'),
recordId: zod_1.z.number().describe('The ID of the record')
});
// Domain import/clone schemas
exports.importZoneSchema = zod_1.z.object({
domain: zod_1.z.string().describe('The domain name to import (e.g., example.com)'),
remote_nameserver: zod_1.z.string().describe('The remote nameserver that contains the zone to import')
});
exports.cloneDomainSchema = zod_1.z.object({
id: zod_1.z.number().describe('The ID of the source domain to clone'),
domain: zod_1.z.string().describe('The new domain name (e.g., clone-example.com)')
});
// Zone file access schema
exports.getZoneFileSchema = zod_1.z.object({
id: zod_1.z.number().describe('The ID of the domain')
});
//# sourceMappingURL=schemas.js.map