UNPKG

@cyanheads/filesystem-mcp-server

Version:

A Model Context Protocol (MCP) server for platform-agnostic file capabilities, including advanced search and replace, and directory tree traversal

32 lines (31 loc) 1.2 kB
import { z } from 'zod'; import { RequestContext } from '../../../utils/internal/requestContext.js'; export declare const CopyPathInputSchema: z.ZodObject<{ source_path: z.ZodString; destination_path: z.ZodString; recursive: z.ZodDefault<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { source_path: string; destination_path: string; recursive: boolean; }, { source_path: string; destination_path: string; recursive?: boolean | undefined; }>; export type CopyPathInput = z.infer<typeof CopyPathInputSchema>; export interface CopyPathOutput { message: string; sourcePath: string; destinationPath: string; wasRecursive: boolean | null; } /** * Copies a file or directory to a new location. * * @param {CopyPathInput} input - The input object containing source, destination, and recursive flag. * @param {RequestContext} context - The request context. * @returns {Promise<CopyPathOutput>} A promise resolving with the copy status. * @throws {McpError} For path errors, source not found, destination already exists, or I/O errors. */ export declare const copyPathLogic: (input: CopyPathInput, context: RequestContext) => Promise<CopyPathOutput>;