/** * ┌─────────────────────────────────────────────────────────────────────────┐ * │ EXTRACT PDF TEXT TOOL - MCP Tool Implementation │ * ├─────────────────────────────────────────────────────────────────────────┤ * │ Filename: extract-text.tool.ts │ * │ Language: TypeScript │ * │ MCP Server: PDF Operations Server │ * │ │ * │ Purpose: │ * │ Implements an MCP tool that extracts all text content from a PDF │ * │ file. Returns cleaned, normalized text with metadata about the │ * │ extraction process. │ * │ │ * │ Why this tool exists: │ * │ - Enables AI to read and analyze PDF content │ * │ - Provides full-text search capability │ * │ - Foundation for summarization and Q&A tools │ * │ - Converts PDF content to AI-processable format │ * │ │ * │ MCP Tool Information: │ * │ Tool Name: extract-pdf-text │ * │ Category: pdf-operations │ * │ Input: { filePath: string, maxLength?: number } │ * │ Output: { text: string, characterCount: number, ... } │ * │ │ * │ Dependencies: │ * │ - @modelcontextprotocol/sdk: MCP server SDK │ * │ - zod: Input validation and schema definition │ * │ - ../utils/pdf-utils: PDF parsing and text cleaning │ * │ │ * │ Author: PDF MCP Team │ * │ Created: 2025-10-29 │ * │ Version: 1.0.0 │ * └─────────────────────────────────────────────────────────────────────────┘ */ import { z } from 'zod'; import type { TextExtractionResult } from '../types.js'; /** * Zod schema for extract-pdf-text tool input validation */ export declare const ExtractTextInputSchema: { filePath: z.ZodString; maxLength: z.ZodOptional; }; /** * Zod schema for extract-pdf-text tool output */ export declare const ExtractTextOutputSchema: { text: z.ZodString; characterCount: z.ZodNumber; pageCount: z.ZodNumber; filePath: z.ZodString; }; /** * Extracts all text content from a PDF file * * @param filePath - Path to the PDF file * @param maxLength - Maximum text length to return (default: 50000) * @returns Object containing extracted text and metadata * @throws Error if file cannot be read or is not a valid PDF */ export declare function extractPDFText(filePath: string, maxLength?: number): Promise; /** * Tool handler for extract-pdf-text * Formats the result for MCP protocol */ export declare const extractTextToolHandler: ({ filePath, maxLength }: { filePath: string; maxLength?: number | undefined; }) => Promise<{ content: { type: "text"; text: string; }[]; structuredContent: TextExtractionResult; }>; //# sourceMappingURL=extract-text.tool.d.ts.map