@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
23 lines (22 loc) • 888 B
TypeScript
import { z } from 'zod';
import { RequestContext } from '../../../utils/internal/requestContext.js';
export declare const ReadFileInputSchema: z.ZodObject<{
path: z.ZodString;
}, "strip", z.ZodTypeAny, {
path: string;
}, {
path: string;
}>;
export type ReadFileInput = z.infer<typeof ReadFileInputSchema>;
export interface ReadFileOutput {
content: string;
}
/**
* Reads the content of a specified file.
*
* @param {ReadFileInput} input - The input object containing the file path.
* @param {RequestContext} context - The request context for logging and error handling.
* @returns {Promise<ReadFileOutput>} A promise that resolves with the file content.
* @throws {McpError} Throws McpError for path resolution errors, file not found, or I/O errors.
*/
export declare const readFileLogic: (input: ReadFileInput, context: RequestContext) => Promise<ReadFileOutput>;