/** * ┌─────────────────────────────────────────────────────────────────────────┐ * │ EXTRACT PDF METADATA TOOL - MCP Tool Implementation │ * ├─────────────────────────────────────────────────────────────────────────┤ * │ Filename: extract-metadata.tool.ts │ * │ Language: TypeScript │ * │ MCP Server: PDF Operations Server │ * │ │ * │ Purpose: │ * │ Implements an MCP tool that extracts metadata from a PDF file │ * │ including title, author, subject, creation date, modification date, │ * │ and PDF version information. │ * │ │ * │ Why this tool exists: │ * │ - Provides document attribution and provenance information │ * │ - Enables AI to understand document context │ * │ - Useful for document management and organization │ * │ - Helps validate document authenticity │ * │ │ * │ MCP Tool Information: │ * │ Tool Name: extract-pdf-metadata │ * │ Category: pdf-operations │ * │ Input: { filePath: string } │ * │ Output: { title, author, subject, creationDate, ... } │ * │ │ * │ Dependencies: │ * │ - @modelcontextprotocol/sdk: MCP server SDK │ * │ - zod: Input validation and schema definition │ * │ - ../utils/pdf-utils: PDF parsing and formatting │ * │ │ * │ Author: PDF MCP Team │ * │ Created: 2025-10-29 │ * │ Version: 1.0.0 │ * └─────────────────────────────────────────────────────────────────────────┘ */ import { z } from 'zod'; import type { MetadataExtractionResult } from '../types.js'; /** * Zod schema for extract-pdf-metadata tool input validation */ export declare const ExtractMetadataInputSchema: { filePath: z.ZodString; }; /** * Zod schema for extract-pdf-metadata tool output */ export declare const ExtractMetadataOutputSchema: { title: z.ZodString; author: z.ZodString; subject: z.ZodString; creationDate: z.ZodString; modificationDate: z.ZodString; pageCount: z.ZodNumber; pdfVersion: z.ZodString; filePath: z.ZodString; }; /** * Extracts metadata from a PDF file * * @param filePath - Path to the PDF file * @returns Object containing PDF metadata * @throws Error if file cannot be read or is not a valid PDF */ export declare function extractPDFMetadata(filePath: string): Promise; /** * Tool handler for extract-pdf-metadata * Formats the result for MCP protocol */ export declare const extractMetadataToolHandler: ({ filePath }: { filePath: string; }) => Promise<{ content: { type: "text"; text: string; }[]; structuredContent: MetadataExtractionResult; }>; //# sourceMappingURL=extract-metadata.tool.d.ts.map