SYMBOL INDEX (189 symbols across 16 files) FILE: src/ebook_mcp/main.py function handle_mcp_errors (line 16) | def handle_mcp_errors(func: Callable[..., T]) -> Callable[..., T]: function handle_pdf_errors (line 36) | def handle_pdf_errors(func: Callable[..., T]) -> Callable[..., T]: function get_all_epub_files (line 76) | def get_all_epub_files(path: str) -> List[str]: function get_epub_metadata (line 83) | def get_epub_metadata(epub_path:str) -> Dict[str, Union[str, List[str]]]: function get_epub_toc (line 102) | def get_epub_toc(epub_path: str) -> List[Tuple[str, str]]: function get_epub_chapter_markdown (line 120) | def get_epub_chapter_markdown(epub_path:str, chapter_id: str) -> str: function get_all_pdf_files (line 146) | def get_all_pdf_files(path: str) -> List[str]: function get_pdf_metadata (line 153) | def get_pdf_metadata(pdf_path: str) -> Dict[str, Union[str, List[str]]]: function get_pdf_toc (line 171) | def get_pdf_toc(pdf_path: str) -> List[Tuple[str, int]]: function get_pdf_page_text (line 189) | def get_pdf_page_text(pdf_path: str, page_number: int) -> str: function get_pdf_page_markdown (line 204) | def get_pdf_page_markdown(pdf_path: str, page_number: int) -> str: function get_pdf_chapter_content (line 219) | def get_pdf_chapter_content(pdf_path: str, chapter_title: str) -> Tuple[... function cli_entry (line 238) | def cli_entry(): FILE: src/ebook_mcp/mcp_client_example/anthropic_example.py class MCPClient (line 32) | class MCPClient: method __init__ (line 37) | def __init__(self): method _estimate_tokens (line 47) | def _estimate_tokens(self, text: str) -> int: method _trim_messages_history (line 54) | def _trim_messages_history(self): method add_message (line 77) | def add_message(self, role: str, content: str): method connect_to_server (line 85) | async def connect_to_server(self, server_script_path: str): method process_query (line 120) | async def process_query(self, query: str) -> str: method chat_loop (line 177) | async def chat_loop(self): method cleanup (line 206) | async def cleanup(self): function main (line 213) | async def main(): FILE: src/ebook_mcp/mcp_client_example/deepseek_example.py function setup_logging (line 18) | def setup_logging(): class MCPClient (line 38) | class MCPClient: method __init__ (line 39) | def __init__(self): method count_tokens (line 55) | def count_tokens(self, messages): method trim_conversation_history (line 63) | def trim_conversation_history(self): method connect_to_server (line 69) | async def connect_to_server(self, server_script_path: str): method process_query (line 96) | async def process_query(self, query: str) -> str: method chat_loop (line 219) | async def chat_loop(self): method cleanup (line 241) | async def cleanup(self): function main (line 246) | async def main(): FILE: src/ebook_mcp/mcp_client_example/openai_example.py function setup_logging (line 19) | def setup_logging(): class MCPClient (line 39) | class MCPClient: method __init__ (line 40) | def __init__(self): method count_tokens (line 51) | def count_tokens(self, messages): method trim_conversation_history (line 72) | def trim_conversation_history(self): method connect_to_server (line 78) | async def connect_to_server(self, server_script_path: str): method process_query (line 105) | async def process_query(self, query: str) -> str: method chat_loop (line 192) | async def chat_loop(self): method cleanup (line 214) | async def cleanup(self): function main (line 219) | async def main(): FILE: src/ebook_mcp/tests/conftest.py function temp_dir (line 8) | def temp_dir(): function mock_epub_book (line 15) | def mock_epub_book(): function mock_pdf_reader (line 31) | def mock_pdf_reader(): function mock_pdf_document (line 48) | def mock_pdf_document(): function sample_epub_files (line 60) | def sample_epub_files(): function sample_pdf_files (line 66) | def sample_pdf_files(): function temp_epub_file (line 72) | def temp_epub_file(): function temp_pdf_file (line 86) | def temp_pdf_file(): FILE: src/ebook_mcp/tests/run_tests.py function run_tests (line 12) | def run_tests(): function run_specific_test (line 50) | def run_specific_test(test_file): function list_tests (line 81) | def list_tests(): FILE: src/ebook_mcp/tests/test_azw.py function test_find_azw_files (line 14) | def test_find_azw_files(tmp_path): function test_get_metadata (line 37) | def test_get_metadata(test_azw_path): function test_get_toc (line 54) | def test_get_toc(test_azw_path): function test_get_chapter_text (line 71) | def test_get_chapter_text(test_azw_path): FILE: src/ebook_mcp/tests/test_basic.py function test_get_all_epub_files_basic (line 8) | def test_get_all_epub_files_basic(): function test_get_all_pdf_files_basic (line 21) | def test_get_all_pdf_files_basic(): function test_file_not_found_error (line 34) | def test_file_not_found_error(): function test_temp_file_operations (line 40) | def test_temp_file_operations(): function test_directory_operations (line 59) | def test_directory_operations(): function test_file_filtering (line 81) | def test_file_filtering(file_extension, expected_count): function test_mock_basic_operations (line 102) | def test_mock_basic_operations(): function test_patch_basic (line 113) | def test_patch_basic(): FILE: src/ebook_mcp/tests/test_epub_chapter_extraction.py class TestExtractChapterHtml (line 28) | class TestExtractChapterHtml: method test_simple_chapter_extraction (line 32) | def test_simple_chapter_extraction(self): method test_chapter_with_subchapters_bug_case (line 74) | def test_chapter_with_subchapters_bug_case(self): method test_comparison_with_original_function (line 144) | def test_comparison_with_original_function(self): method test_markdown_conversion (line 192) | def test_markdown_conversion(self): method test_edge_cases (line 233) | def test_edge_cases(self): method test_last_chapter_extraction (line 258) | def test_last_chapter_extraction(self): method test_complex_nested_toc (line 298) | def test_complex_nested_toc(self): FILE: src/ebook_mcp/tests/test_epub_helper.py class TestEpubHelper (line 36) | class TestEpubHelper: method test_get_all_epub_files_empty_directory (line 39) | def test_get_all_epub_files_empty_directory(self): method test_get_all_epub_files_with_epub_files (line 45) | def test_get_all_epub_files_with_epub_files(self): method test_get_toc_success (line 58) | def test_get_toc_success(self, mock_read_epub): method test_get_toc_nested_structure (line 87) | def test_get_toc_nested_structure(self, mock_read_epub): method test_get_toc_file_not_found (line 115) | def test_get_toc_file_not_found(self): method test_get_toc_parsing_error (line 121) | def test_get_toc_parsing_error(self, mock_read_epub): method test_get_meta_success (line 136) | def test_get_meta_success(self, mock_read_epub): method test_get_meta_file_not_found (line 176) | def test_get_meta_file_not_found(self): method test_get_meta_parsing_error (line 182) | def test_get_meta_parsing_error(self, mock_read_epub): method test_read_epub_success (line 197) | def test_read_epub_success(self, mock_read_epub): method test_flatten_toc_simple (line 213) | def test_flatten_toc_simple(self): method test_flatten_toc_nested (line 230) | def test_flatten_toc_nested(self): method test_clean_html (line 247) | def test_clean_html(self): method test_convert_html_to_markdown (line 271) | def test_convert_html_to_markdown(self): method test_extract_chapter_plain_text (line 282) | def test_extract_chapter_plain_text(self, mock_extract_html): FILE: src/ebook_mcp/tests/test_logger_config.py class TestStructuredFormatter (line 16) | class TestStructuredFormatter: method test_format_basic_log (line 19) | def test_format_basic_log(self): method test_format_with_extra_fields (line 44) | def test_format_with_extra_fields(self): method test_format_with_exception (line 71) | def test_format_with_exception(self): class TestStructuredLogger (line 96) | class TestStructuredLogger: method test_logger_creation (line 99) | def test_logger_creation(self): method test_log_with_context (line 105) | def test_log_with_context(self): class TestLogOperationDecorator (line 116) | class TestLogOperationDecorator: method test_log_operation_success (line 119) | def test_log_operation_success(self): method test_log_operation_failure (line 128) | def test_log_operation_failure(self): class TestSetupLogger (line 137) | class TestSetupLogger: method test_setup_logger_creates_directory (line 140) | def test_setup_logger_creates_directory(self): method test_setup_logger_configures_handlers (line 151) | def test_setup_logger_configures_handlers(self): FILE: src/ebook_mcp/tests/test_main.py class TestEpubFunctions (line 33) | class TestEpubFunctions: method test_get_all_epub_files_empty_directory (line 36) | def test_get_all_epub_files_empty_directory(self): method test_get_all_epub_files_with_epub_files (line 42) | def test_get_all_epub_files_with_epub_files(self): method test_get_epub_metadata_success (line 55) | def test_get_epub_metadata_success(self, mock_get_meta): method test_get_epub_metadata_file_not_found (line 69) | def test_get_epub_metadata_file_not_found(self, mock_get_meta): method test_get_epub_metadata_parsing_error (line 77) | def test_get_epub_metadata_parsing_error(self, mock_get_meta): method test_get_epub_toc_success (line 85) | def test_get_epub_toc_success(self, mock_get_toc): method test_get_epub_toc_file_not_found (line 98) | def test_get_epub_toc_file_not_found(self, mock_get_toc): class TestPdfFunctions (line 106) | class TestPdfFunctions: method test_get_all_pdf_files_empty_directory (line 109) | def test_get_all_pdf_files_empty_directory(self): method test_get_all_pdf_files_with_pdf_files (line 115) | def test_get_all_pdf_files_with_pdf_files(self): method test_get_pdf_metadata_success (line 128) | def test_get_pdf_metadata_success(self, mock_get_meta): method test_get_pdf_metadata_file_not_found (line 142) | def test_get_pdf_metadata_file_not_found(self, mock_get_meta): method test_get_pdf_metadata_parsing_error (line 150) | def test_get_pdf_metadata_parsing_error(self, mock_get_meta): method test_get_pdf_toc_success (line 158) | def test_get_pdf_toc_success(self, mock_get_toc): method test_get_pdf_toc_file_not_found (line 171) | def test_get_pdf_toc_file_not_found(self, mock_get_toc): method test_get_pdf_page_text_success (line 179) | def test_get_pdf_page_text_success(self, mock_extract): method test_get_pdf_page_text_error (line 188) | def test_get_pdf_page_text_error(self, mock_extract): method test_get_pdf_page_markdown_success (line 196) | def test_get_pdf_page_markdown_success(self, mock_extract): method test_get_pdf_page_markdown_error (line 205) | def test_get_pdf_page_markdown_error(self, mock_extract): method test_get_pdf_chapter_content_success (line 213) | def test_get_pdf_chapter_content_success(self, mock_get_chapter): method test_get_pdf_chapter_content_error (line 223) | def test_get_pdf_chapter_content_error(self, mock_get_chapter): class TestMainModule (line 231) | class TestMainModule: method test_main_module_imports (line 234) | def test_main_module_imports(self): method test_cli_entry_function (line 242) | def test_cli_entry_function(self): class TestDecorators (line 255) | class TestDecorators: method test_handle_mcp_errors_file_not_found (line 258) | def test_handle_mcp_errors_file_not_found(self): method test_handle_mcp_errors_general_exception (line 269) | def test_handle_mcp_errors_general_exception(self): method test_handle_pdf_errors (line 280) | def test_handle_pdf_errors(self): method test_decorator_preserves_return_value (line 291) | def test_decorator_preserves_return_value(self): method test_handle_mcp_errors_with_custom_exceptions (line 302) | def test_handle_mcp_errors_with_custom_exceptions(self): FILE: src/ebook_mcp/tests/test_pdf_helper.py class TestPdfHelper (line 26) | class TestPdfHelper: method test_get_all_pdf_files_empty_directory (line 29) | def test_get_all_pdf_files_empty_directory(self): method test_get_all_pdf_files_with_pdf_files (line 35) | def test_get_all_pdf_files_with_pdf_files(self): method test_get_meta_success (line 48) | def test_get_meta_success(self, mock_fitz_open): method test_get_meta_no_metadata (line 99) | def test_get_meta_no_metadata(self, mock_fitz_open): method test_get_meta_file_not_found (line 134) | def test_get_meta_file_not_found(self): method test_get_meta_parsing_error (line 140) | def test_get_meta_parsing_error(self, mock_fitz_open): method test_get_toc_success (line 155) | def test_get_toc_success(self, mock_fitz_open): method test_get_toc_empty (line 182) | def test_get_toc_empty(self, mock_fitz_open): method test_get_toc_file_not_found (line 199) | def test_get_toc_file_not_found(self): method test_get_toc_parsing_error (line 205) | def test_get_toc_parsing_error(self, mock_fitz_open): method test_extract_page_text_success (line 220) | def test_extract_page_text_success(self, mock_fitz_open): method test_extract_page_text_page_not_found (line 240) | def test_extract_page_text_page_not_found(self, mock_fitz_open): method test_extract_page_markdown_success (line 258) | def test_extract_page_markdown_success(self, mock_fitz_open): method test_extract_page_markdown_with_formatting (line 294) | def test_extract_page_markdown_with_formatting(self, mock_fitz_open): method test_extract_chapter_by_title_success (line 328) | def test_extract_chapter_by_title_success(self, mock_fitz_open): method test_extract_chapter_by_title_chapter_not_found (line 362) | def test_extract_chapter_by_title_chapter_not_found(self, mock_fitz_op... method test_extract_chapter_by_title_single_page (line 383) | def test_extract_chapter_by_title_single_page(self, mock_fitz_open): FILE: src/ebook_mcp/tools/epub_helper.py class EpubProcessingError (line 6) | class EpubProcessingError(Exception): method __init__ (line 8) | def __init__(self, message: str, file_path: str, operation: str, origi... class PdfProcessingError (line 15) | class PdfProcessingError(Exception): method __init__ (line 17) | def __init__(self, message: str, file_path: str, operation: str, origi... function get_all_epub_files (line 51) | def get_all_epub_files(path: str) -> List[str]: function get_toc (line 58) | def get_toc(epub_path: str) -> List[Tuple[str, str]]: function get_meta (line 127) | def get_meta(epub_path: str) -> Dict[str, Union[str, List[str]]]: function extract_chapter_from_epub (line 207) | def extract_chapter_from_epub(epub_path: str, anchor_href: str) -> str: function read_epub (line 263) | def read_epub(epub_path: str) -> Any: function flatten_toc (line 266) | def flatten_toc(book: Any) -> List[str]: function extract_chapter_plain_text (line 281) | def extract_chapter_plain_text(book: Any, anchor_href: str) -> str: function convert_html_to_markdown (line 288) | def convert_html_to_markdown(html_str: str) -> str: function clean_html (line 294) | def clean_html(html_str: str) -> str: function extract_chapter_html (line 323) | def extract_chapter_html(book: Any, anchor_href: str) -> str: function extract_chapter_markdown (line 404) | def extract_chapter_markdown(book: Any, anchor_href: str) -> str: function extract_multiple_chapters (line 410) | def extract_multiple_chapters(book: Any, anchor_list: List[str], output:... FILE: src/ebook_mcp/tools/logger_config.py class StructuredFormatter (line 10) | class StructuredFormatter(logging.Formatter): method format (line 13) | def format(self, record: logging.LogRecord) -> str: class StructuredLogger (line 53) | class StructuredLogger: method __init__ (line 56) | def __init__(self, name: str): method _log_with_context (line 60) | def _log_with_context(self, level: int, message: str, **context): method info (line 75) | def info(self, message: str, **context): method debug (line 79) | def debug(self, message: str, **context): method warning (line 83) | def warning(self, message: str, **context): method error (line 87) | def error(self, message: str, **context): method critical (line 91) | def critical(self, message: str, **context): function setup_logger (line 95) | def setup_logger(level: str = "INFO", log_file: str = "ebook_mcp.log"): function get_logger (line 133) | def get_logger(name: str) -> StructuredLogger: function log_operation (line 137) | def log_operation(operation_name: str): FILE: src/ebook_mcp/tools/pdf_helper.py class PdfProcessingError (line 9) | class PdfProcessingError(Exception): method __init__ (line 11) | def __init__(self, message: str, file_path: str, operation: str, origi... function get_all_pdf_files (line 21) | def get_all_pdf_files(path: str) -> List[str]: function get_meta (line 28) | def get_meta(pdf_path: str) -> Dict[str, Union[str, List[str]]]: function get_toc (line 135) | def get_toc(pdf_path: str) -> List[Tuple[str, int]]: function extract_page_text (line 194) | def extract_page_text(pdf_path: str, page_number: int) -> str: function extract_page_markdown (line 223) | def extract_page_markdown(pdf_path: str, page_number: int) -> str: function extract_chapter_by_title (line 275) | def extract_chapter_by_title(pdf_path: str, chapter_title: str) -> Tuple...