lightpdf-aipdf-mcp 0.1.79__py3-none-any.whl → 0.1.81__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lightpdf_aipdf_mcp/converter.py +3 -1
- lightpdf_aipdf_mcp/editor.py +6 -2
- lightpdf_aipdf_mcp/server.py +83 -83
- {lightpdf_aipdf_mcp-0.1.79.dist-info → lightpdf_aipdf_mcp-0.1.81.dist-info}/METADATA +1 -1
- lightpdf_aipdf_mcp-0.1.81.dist-info/RECORD +9 -0
- lightpdf_aipdf_mcp-0.1.79.dist-info/RECORD +0 -9
- {lightpdf_aipdf_mcp-0.1.79.dist-info → lightpdf_aipdf_mcp-0.1.81.dist-info}/WHEEL +0 -0
- {lightpdf_aipdf_mcp-0.1.79.dist-info → lightpdf_aipdf_mcp-0.1.81.dist-info}/entry_points.txt +0 -0
lightpdf_aipdf_mcp/converter.py
CHANGED
@@ -243,6 +243,7 @@ class Converter(BaseApiClient):
|
|
243
243
|
|
244
244
|
import httpx
|
245
245
|
async with httpx.AsyncClient(timeout=3600.0) as client:
|
246
|
+
task_id = None
|
246
247
|
try:
|
247
248
|
# 初始化extra_params(如果为None)
|
248
249
|
if extra_params is None:
|
@@ -279,7 +280,8 @@ class Converter(BaseApiClient):
|
|
279
280
|
file_path=file_path,
|
280
281
|
error_message=str(e),
|
281
282
|
download_url=None,
|
282
|
-
original_name=original_name
|
283
|
+
original_name=original_name,
|
284
|
+
task_id=task_id
|
283
285
|
)
|
284
286
|
|
285
287
|
async def _create_task(self, client: httpx.AsyncClient, file_path: str, format: str, extra_params: dict = None) -> str:
|
lightpdf_aipdf_mcp/editor.py
CHANGED
@@ -138,6 +138,7 @@ class Editor(BaseApiClient):
|
|
138
138
|
|
139
139
|
# 合并PDF需要特殊处理,因为涉及多个文件
|
140
140
|
async with httpx.AsyncClient(timeout=3600.0) as client:
|
141
|
+
task_id = None
|
141
142
|
try:
|
142
143
|
# 创建合并任务
|
143
144
|
task_id = await self._create_merge_task(client, file_paths, password, original_name)
|
@@ -163,7 +164,8 @@ class Editor(BaseApiClient):
|
|
163
164
|
file_path=file_paths[0],
|
164
165
|
error_message=str(e),
|
165
166
|
download_url=None,
|
166
|
-
original_name=original_name
|
167
|
+
original_name=original_name,
|
168
|
+
task_id=task_id
|
167
169
|
)
|
168
170
|
|
169
171
|
async def rotate_pdf(self, file_path: str, angle_params: Dict[str, str], password: Optional[str] = None, original_name: Optional[str] = None) -> EditResult:
|
@@ -446,6 +448,7 @@ class Editor(BaseApiClient):
|
|
446
448
|
return EditResult(success=False, file_path=file_path, error_message="文件不存在", original_name=original_name)
|
447
449
|
|
448
450
|
async with httpx.AsyncClient(timeout=3600.0) as client:
|
451
|
+
task_id = None
|
449
452
|
try:
|
450
453
|
# 初始化extra_params(如果为None)
|
451
454
|
if extra_params is None:
|
@@ -482,7 +485,8 @@ class Editor(BaseApiClient):
|
|
482
485
|
file_path=file_path,
|
483
486
|
error_message=str(e),
|
484
487
|
download_url=None,
|
485
|
-
original_name=original_name
|
488
|
+
original_name=original_name,
|
489
|
+
task_id=task_id
|
486
490
|
)
|
487
491
|
|
488
492
|
async def _create_task(self, client: httpx.AsyncClient, file_path: str, edit_type: EditType, extra_params: Dict[str, Any] = None) -> str:
|
lightpdf_aipdf_mcp/server.py
CHANGED
@@ -350,7 +350,7 @@ async def process_tool_call(
|
|
350
350
|
# 创建Server实例
|
351
351
|
app = Server(
|
352
352
|
name="LightPDF_AI_tools",
|
353
|
-
instructions="
|
353
|
+
instructions="LightPDF Document Processing Tools.",
|
354
354
|
)
|
355
355
|
|
356
356
|
# 定义工具
|
@@ -359,7 +359,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
359
359
|
return [
|
360
360
|
types.Tool(
|
361
361
|
name="convert_document",
|
362
|
-
description="
|
362
|
+
description="Document format conversion tool.\n\nPDF can be converted to: DOCX/XLSX/PPTX/Images (including long images)/HTML/TXT (for text extraction);\nOther formats can be converted to PDF: DOCX/XLSX/PPTX/Images/CAD/CAJ/OFD.\n\nDoes not support creating files from content",
|
363
363
|
inputSchema={
|
364
364
|
"type": "object",
|
365
365
|
"properties": {
|
@@ -370,29 +370,29 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
370
370
|
"properties": {
|
371
371
|
"path": {
|
372
372
|
"type": "string",
|
373
|
-
"description": "
|
373
|
+
"description": "File URL, must include protocol, supports http/https/oss"
|
374
374
|
},
|
375
375
|
"password": {
|
376
376
|
"type": "string",
|
377
|
-
"description": "
|
377
|
+
"description": "Document password, required if the document is password-protected"
|
378
378
|
},
|
379
379
|
"name": {
|
380
380
|
"type": "string",
|
381
|
-
"description": "
|
381
|
+
"description": "Original filename of the document"
|
382
382
|
}
|
383
383
|
},
|
384
384
|
"required": ["path"]
|
385
385
|
},
|
386
|
-
"description": "
|
386
|
+
"description": "List of files to convert, each containing path and optional password"
|
387
387
|
},
|
388
388
|
"format": {
|
389
389
|
"type": "string",
|
390
|
-
"description": "
|
390
|
+
"description": "Target format",
|
391
391
|
"enum": ["pdf", "docx", "xlsx", "pptx", "jpg", "jpeg", "png", "html", "txt"]
|
392
392
|
},
|
393
393
|
"is_long_image": {
|
394
394
|
"type": "boolean",
|
395
|
-
"description": "
|
395
|
+
"description": "Whether to convert to a long image. Only valid when format is jpg/jpeg/png",
|
396
396
|
"default": False
|
397
397
|
}
|
398
398
|
},
|
@@ -401,7 +401,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
401
401
|
),
|
402
402
|
types.Tool(
|
403
403
|
name="add_page_numbers",
|
404
|
-
description="
|
404
|
+
description="Add page numbers to each page of a PDF document.",
|
405
405
|
inputSchema={
|
406
406
|
"type": "object",
|
407
407
|
"properties": {
|
@@ -412,36 +412,36 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
412
412
|
"properties": {
|
413
413
|
"path": {
|
414
414
|
"type": "string",
|
415
|
-
"description": "PDF
|
415
|
+
"description": "PDF file URL, must include protocol, supports http/https/oss"
|
416
416
|
},
|
417
417
|
"password": {
|
418
418
|
"type": "string",
|
419
|
-
"description": "PDF
|
419
|
+
"description": "PDF document password, required if the document is password-protected"
|
420
420
|
},
|
421
421
|
"name": {
|
422
422
|
"type": "string",
|
423
|
-
"description": "
|
423
|
+
"description": "Original filename of the document"
|
424
424
|
}
|
425
425
|
},
|
426
426
|
"required": ["path"]
|
427
427
|
},
|
428
|
-
"description": "
|
428
|
+
"description": "List of PDF files to add page numbers to, each containing path and optional password"
|
429
429
|
},
|
430
430
|
"start_num": {
|
431
431
|
"type": "integer",
|
432
|
-
"description": "
|
432
|
+
"description": "Starting page number",
|
433
433
|
"default": 1,
|
434
434
|
"minimum": 1
|
435
435
|
},
|
436
436
|
"position": {
|
437
437
|
"type": "string",
|
438
|
-
"description": "
|
438
|
+
"description": "Page number position: 1(top-left), 2(top-center), 3(top-right), 4(bottom-left), 5(bottom-center), 6(bottom-right)",
|
439
439
|
"enum": ["1", "2", "3", "4", "5", "6"],
|
440
440
|
"default": "5"
|
441
441
|
},
|
442
442
|
"margin": {
|
443
443
|
"type": "integer",
|
444
|
-
"description": "
|
444
|
+
"description": "Page number margin",
|
445
445
|
"enum": [10, 30, 60],
|
446
446
|
"default": 30
|
447
447
|
}
|
@@ -451,7 +451,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
451
451
|
),
|
452
452
|
types.Tool(
|
453
453
|
name="remove_watermark",
|
454
|
-
description="
|
454
|
+
description="Remove watermarks from PDF files.",
|
455
455
|
inputSchema={
|
456
456
|
"type": "object",
|
457
457
|
"properties": {
|
@@ -462,20 +462,20 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
462
462
|
"properties": {
|
463
463
|
"path": {
|
464
464
|
"type": "string",
|
465
|
-
"description": "PDF
|
465
|
+
"description": "PDF file URL, must include protocol, supports http/https/oss"
|
466
466
|
},
|
467
467
|
"password": {
|
468
468
|
"type": "string",
|
469
|
-
"description": "PDF
|
469
|
+
"description": "PDF document password, required if the document is password-protected"
|
470
470
|
},
|
471
471
|
"name": {
|
472
472
|
"type": "string",
|
473
|
-
"description": "
|
473
|
+
"description": "Original filename of the document"
|
474
474
|
}
|
475
475
|
},
|
476
476
|
"required": ["path"]
|
477
477
|
},
|
478
|
-
"description": "
|
478
|
+
"description": "List of PDF files to remove watermarks from, each containing path and optional password"
|
479
479
|
}
|
480
480
|
},
|
481
481
|
"required": ["files"]
|
@@ -483,7 +483,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
483
483
|
),
|
484
484
|
types.Tool(
|
485
485
|
name="add_watermark",
|
486
|
-
description="
|
486
|
+
description="Add text watermarks to PDF files.",
|
487
487
|
inputSchema={
|
488
488
|
"type": "object",
|
489
489
|
"properties": {
|
@@ -494,60 +494,60 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
494
494
|
"properties": {
|
495
495
|
"path": {
|
496
496
|
"type": "string",
|
497
|
-
"description": "
|
497
|
+
"description": "PDF file URL to add watermark to, must include protocol, supports http/https/oss"
|
498
498
|
},
|
499
499
|
"password": {
|
500
500
|
"type": "string",
|
501
|
-
"description": "PDF
|
501
|
+
"description": "PDF document password, required if the document is password-protected"
|
502
502
|
},
|
503
503
|
"name": {
|
504
504
|
"type": "string",
|
505
|
-
"description": "
|
505
|
+
"description": "Original filename of the document"
|
506
506
|
}
|
507
507
|
},
|
508
508
|
"required": ["path"]
|
509
509
|
},
|
510
|
-
"description": "
|
510
|
+
"description": "List of PDF files to add watermarks to, each containing path and optional password"
|
511
511
|
},
|
512
512
|
"text": {
|
513
513
|
"type": "string",
|
514
|
-
"description": "
|
514
|
+
"description": "Watermark text content"
|
515
515
|
},
|
516
516
|
"position": {
|
517
517
|
"type": "string",
|
518
|
-
"description": "
|
518
|
+
"description": "Watermark position: top-left(topleft), top-center(top), top-right(topright), left(left), center(center), right(right), bottom-left(bottomleft), bottom(bottom), bottom-right(bottomright), diagonal(diagonal, -45 degrees), reverse-diagonal(reverse-diagonal, 45 degrees)",
|
519
519
|
"enum": ["topleft", "top", "topright", "left", "center", "right",
|
520
520
|
"bottomleft", "bottom", "bottomright", "diagonal", "reverse-diagonal"],
|
521
521
|
"default": "center"
|
522
522
|
},
|
523
523
|
"opacity": {
|
524
524
|
"type": "number",
|
525
|
-
"description": "
|
525
|
+
"description": "Opacity, 0.0-1.0",
|
526
526
|
"default": 1.0,
|
527
527
|
"minimum": 0.0,
|
528
528
|
"maximum": 1.0
|
529
529
|
},
|
530
530
|
"range": {
|
531
531
|
"type": "string",
|
532
|
-
"description": "
|
532
|
+
"description": "Page range, e.g. '1,3,5-7' or '' (empty string or not set) for all pages"
|
533
533
|
},
|
534
534
|
"layout": {
|
535
535
|
"type": "string",
|
536
|
-
"description": "
|
536
|
+
"description": "Layout position: on top of content(on) or under content(under)",
|
537
537
|
"enum": ["on", "under"],
|
538
538
|
"default": "on"
|
539
539
|
},
|
540
540
|
"font_family": {
|
541
541
|
"type": "string",
|
542
|
-
"description": "
|
542
|
+
"description": "Font family"
|
543
543
|
},
|
544
544
|
"font_size": {
|
545
545
|
"type": "integer",
|
546
|
-
"description": "
|
546
|
+
"description": "Font size"
|
547
547
|
},
|
548
548
|
"font_color": {
|
549
549
|
"type": "string",
|
550
|
-
"description": "
|
550
|
+
"description": "Font color, e.g. '#ff0000' for red"
|
551
551
|
}
|
552
552
|
},
|
553
553
|
"required": ["files", "text", "position"]
|
@@ -555,7 +555,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
555
555
|
),
|
556
556
|
types.Tool(
|
557
557
|
name="unlock_pdf",
|
558
|
-
description="
|
558
|
+
description="Remove password protection from PDF files.",
|
559
559
|
inputSchema={
|
560
560
|
"type": "object",
|
561
561
|
"properties": {
|
@@ -566,20 +566,20 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
566
566
|
"properties": {
|
567
567
|
"path": {
|
568
568
|
"type": "string",
|
569
|
-
"description": "
|
569
|
+
"description": "PDF file URL to decrypt, must include protocol, supports http/https/oss"
|
570
570
|
},
|
571
571
|
"password": {
|
572
572
|
"type": "string",
|
573
|
-
"description": "PDF
|
573
|
+
"description": "PDF document password, required to unlock the document if it is password-protected"
|
574
574
|
},
|
575
575
|
"name": {
|
576
576
|
"type": "string",
|
577
|
-
"description": "
|
577
|
+
"description": "Original filename of the document"
|
578
578
|
}
|
579
579
|
},
|
580
580
|
"required": ["path", "password"]
|
581
581
|
},
|
582
|
-
"description": "
|
582
|
+
"description": "List of PDF files to decrypt, each containing path and password"
|
583
583
|
}
|
584
584
|
},
|
585
585
|
"required": ["files"]
|
@@ -587,7 +587,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
587
587
|
),
|
588
588
|
types.Tool(
|
589
589
|
name="protect_pdf",
|
590
|
-
description="
|
590
|
+
description="Add password protection to PDF files.",
|
591
591
|
inputSchema={
|
592
592
|
"type": "object",
|
593
593
|
"properties": {
|
@@ -598,24 +598,24 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
598
598
|
"properties": {
|
599
599
|
"path": {
|
600
600
|
"type": "string",
|
601
|
-
"description": "
|
601
|
+
"description": "PDF file URL to encrypt, must include protocol, supports http/https/oss"
|
602
602
|
},
|
603
603
|
"password": {
|
604
604
|
"type": "string",
|
605
|
-
"description": "PDF
|
605
|
+
"description": "PDF document password, required if the document is password-protected"
|
606
606
|
},
|
607
607
|
"name": {
|
608
608
|
"type": "string",
|
609
|
-
"description": "
|
609
|
+
"description": "Original filename of the document"
|
610
610
|
}
|
611
611
|
},
|
612
612
|
"required": ["path"]
|
613
613
|
},
|
614
|
-
"description": "
|
614
|
+
"description": "List of PDF files to encrypt, each containing path and optional current password"
|
615
615
|
},
|
616
616
|
"password": {
|
617
617
|
"type": "string",
|
618
|
-
"description": "
|
618
|
+
"description": "New password to set"
|
619
619
|
}
|
620
620
|
},
|
621
621
|
"required": ["files", "password"]
|
@@ -623,7 +623,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
623
623
|
),
|
624
624
|
types.Tool(
|
625
625
|
name="compress_pdf",
|
626
|
-
description="
|
626
|
+
description="Reduce the size of PDF files.",
|
627
627
|
inputSchema={
|
628
628
|
"type": "object",
|
629
629
|
"properties": {
|
@@ -634,24 +634,24 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
634
634
|
"properties": {
|
635
635
|
"path": {
|
636
636
|
"type": "string",
|
637
|
-
"description": "
|
637
|
+
"description": "PDF file URL to compress, must include protocol, supports http/https/oss"
|
638
638
|
},
|
639
639
|
"password": {
|
640
640
|
"type": "string",
|
641
|
-
"description": "PDF
|
641
|
+
"description": "PDF document password, required if the document is password-protected"
|
642
642
|
},
|
643
643
|
"name": {
|
644
644
|
"type": "string",
|
645
|
-
"description": "
|
645
|
+
"description": "Original filename of the document"
|
646
646
|
}
|
647
647
|
},
|
648
648
|
"required": ["path"]
|
649
649
|
},
|
650
|
-
"description": "
|
650
|
+
"description": "List of PDF files to compress, each containing path and optional password"
|
651
651
|
},
|
652
652
|
"image_quantity": {
|
653
653
|
"type": "integer",
|
654
|
-
"description": "
|
654
|
+
"description": "Image quality, 1-100, lower values result in higher compression",
|
655
655
|
"default": 60,
|
656
656
|
"minimum": 1,
|
657
657
|
"maximum": 100
|
@@ -662,7 +662,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
662
662
|
),
|
663
663
|
types.Tool(
|
664
664
|
name="split_pdf",
|
665
|
-
description="
|
665
|
+
description="Split PDF documents by pages. Can split each page into a separate PDF file, or split by specified page ranges. Split files can be multiple independent PDF files (returned as a zip package) or merged into a single PDF file.",
|
666
666
|
inputSchema={
|
667
667
|
"type": "object",
|
668
668
|
"properties": {
|
@@ -673,34 +673,34 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
673
673
|
"properties": {
|
674
674
|
"path": {
|
675
675
|
"type": "string",
|
676
|
-
"description": "
|
676
|
+
"description": "PDF file URL to split, must include protocol, supports http/https/oss"
|
677
677
|
},
|
678
678
|
"password": {
|
679
679
|
"type": "string",
|
680
|
-
"description": "PDF
|
680
|
+
"description": "PDF document password, required if the document is password-protected"
|
681
681
|
},
|
682
682
|
"name": {
|
683
683
|
"type": "string",
|
684
|
-
"description": "
|
684
|
+
"description": "Original filename of the document"
|
685
685
|
}
|
686
686
|
},
|
687
687
|
"required": ["path"]
|
688
688
|
},
|
689
|
-
"description": "
|
689
|
+
"description": "List of PDF files to split, each containing path and optional password"
|
690
690
|
},
|
691
691
|
"split_type": {
|
692
692
|
"type": "string",
|
693
|
-
"description": "
|
693
|
+
"description": "Split type: split each page into a separate file(every) or split by page ranges(page)",
|
694
694
|
"enum": ["every", "page"],
|
695
695
|
"default": "page"
|
696
696
|
},
|
697
697
|
"pages": {
|
698
698
|
"type": "string",
|
699
|
-
"description": "
|
699
|
+
"description": "Specify page ranges to split, e.g. '1,3,5-7' or '' (empty string or not set) for all pages. Only valid when split_type is page"
|
700
700
|
},
|
701
701
|
"merge_all": {
|
702
702
|
"type": "integer",
|
703
|
-
"description": "
|
703
|
+
"description": "Whether to merge results into a single PDF file: 1=yes, 0=no (will return a zip package of multiple files). Only valid when split_type is page",
|
704
704
|
"enum": [0, 1],
|
705
705
|
"default": 0
|
706
706
|
}
|
@@ -710,7 +710,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
710
710
|
),
|
711
711
|
types.Tool(
|
712
712
|
name="merge_pdfs",
|
713
|
-
description="
|
713
|
+
description="Merge multiple PDF files into a single PDF file.",
|
714
714
|
inputSchema={
|
715
715
|
"type": "object",
|
716
716
|
"properties": {
|
@@ -721,20 +721,20 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
721
721
|
"properties": {
|
722
722
|
"path": {
|
723
723
|
"type": "string",
|
724
|
-
"description": "
|
724
|
+
"description": "PDF file URL to merge, must include protocol, supports http/https/oss"
|
725
725
|
},
|
726
726
|
"password": {
|
727
727
|
"type": "string",
|
728
|
-
"description": "PDF
|
728
|
+
"description": "PDF document password, required if the document is password-protected"
|
729
729
|
},
|
730
730
|
"name": {
|
731
731
|
"type": "string",
|
732
|
-
"description": "
|
732
|
+
"description": "Original filename of the document"
|
733
733
|
}
|
734
734
|
},
|
735
735
|
"required": ["path"]
|
736
736
|
},
|
737
|
-
"description": "
|
737
|
+
"description": "List of PDF files to merge, each containing path and optional password"
|
738
738
|
}
|
739
739
|
},
|
740
740
|
"required": ["files"]
|
@@ -742,7 +742,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
742
742
|
),
|
743
743
|
types.Tool(
|
744
744
|
name="rotate_pdf",
|
745
|
-
description="
|
745
|
+
description="Rotate pages in PDF files.",
|
746
746
|
inputSchema={
|
747
747
|
"type": "object",
|
748
748
|
"properties": {
|
@@ -753,20 +753,20 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
753
753
|
"properties": {
|
754
754
|
"path": {
|
755
755
|
"type": "string",
|
756
|
-
"description": "
|
756
|
+
"description": "PDF file URL to rotate, must include protocol, supports http/https/oss"
|
757
757
|
},
|
758
758
|
"password": {
|
759
759
|
"type": "string",
|
760
|
-
"description": "PDF
|
760
|
+
"description": "PDF document password, required if the document is password-protected"
|
761
761
|
},
|
762
762
|
"name": {
|
763
763
|
"type": "string",
|
764
|
-
"description": "
|
764
|
+
"description": "Original filename of the document"
|
765
765
|
}
|
766
766
|
},
|
767
767
|
"required": ["path"]
|
768
768
|
},
|
769
|
-
"description": "
|
769
|
+
"description": "List of PDF files to rotate, each containing path and optional password"
|
770
770
|
},
|
771
771
|
"rotates": {
|
772
772
|
"type": "array",
|
@@ -775,19 +775,19 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
775
775
|
"properties": {
|
776
776
|
"angle": {
|
777
777
|
"type": "integer",
|
778
|
-
"description": "
|
778
|
+
"description": "Rotation angle, options are 90, 180, 270",
|
779
779
|
"enum": [90, 180, 270],
|
780
780
|
"default": 90
|
781
781
|
},
|
782
782
|
"pages": {
|
783
783
|
"type": "string",
|
784
|
-
"description": "
|
784
|
+
"description": "Specify page ranges to rotate, e.g. '1,3,5-7' or 'all' for all pages",
|
785
785
|
"default": "all"
|
786
786
|
}
|
787
787
|
},
|
788
788
|
"required": ["angle", "pages"]
|
789
789
|
},
|
790
|
-
"description": "
|
790
|
+
"description": "Parameter list, each containing rotation angle and page range"
|
791
791
|
}
|
792
792
|
},
|
793
793
|
"required": ["files", "rotates"]
|
@@ -795,7 +795,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
795
795
|
),
|
796
796
|
types.Tool(
|
797
797
|
name="remove_margin",
|
798
|
-
description="
|
798
|
+
description="Remove white margins from PDF files (crop page margins).",
|
799
799
|
inputSchema={
|
800
800
|
"type": "object",
|
801
801
|
"properties": {
|
@@ -806,20 +806,20 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
806
806
|
"properties": {
|
807
807
|
"path": {
|
808
808
|
"type": "string",
|
809
|
-
"description": "
|
809
|
+
"description": "PDF file URL to remove margins from, must include protocol, supports http/https/oss"
|
810
810
|
},
|
811
811
|
"password": {
|
812
812
|
"type": "string",
|
813
|
-
"description": "PDF
|
813
|
+
"description": "PDF document password, required if the document is password-protected"
|
814
814
|
},
|
815
815
|
"name": {
|
816
816
|
"type": "string",
|
817
|
-
"description": "
|
817
|
+
"description": "Original filename of the document"
|
818
818
|
}
|
819
819
|
},
|
820
820
|
"required": ["path"]
|
821
821
|
},
|
822
|
-
"description": "
|
822
|
+
"description": "List of PDF files to remove margins from, each containing path and optional password"
|
823
823
|
}
|
824
824
|
},
|
825
825
|
"required": ["files"]
|
@@ -827,7 +827,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
827
827
|
),
|
828
828
|
types.Tool(
|
829
829
|
name="extract_images",
|
830
|
-
description="
|
830
|
+
description="Extract image resources from all pages of a PDF, supporting multiple image formats.",
|
831
831
|
inputSchema={
|
832
832
|
"type": "object",
|
833
833
|
"properties": {
|
@@ -838,24 +838,24 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
838
838
|
"properties": {
|
839
839
|
"path": {
|
840
840
|
"type": "string",
|
841
|
-
"description": "
|
841
|
+
"description": "PDF file URL to extract images from, must include protocol, supports http/https/oss"
|
842
842
|
},
|
843
843
|
"password": {
|
844
844
|
"type": "string",
|
845
|
-
"description": "PDF
|
845
|
+
"description": "PDF document password, required if the document is password-protected"
|
846
846
|
},
|
847
847
|
"name": {
|
848
848
|
"type": "string",
|
849
|
-
"description": "
|
849
|
+
"description": "Original filename of the document"
|
850
850
|
}
|
851
851
|
},
|
852
852
|
"required": ["path"]
|
853
853
|
},
|
854
|
-
"description": "
|
854
|
+
"description": "List of PDF files to extract images from, each containing path and optional password"
|
855
855
|
},
|
856
856
|
"format": {
|
857
857
|
"type": "string",
|
858
|
-
"description": "
|
858
|
+
"description": "Extracted image format",
|
859
859
|
"enum": ["bmp", "png", "gif", "tif", "jpg"],
|
860
860
|
"default": "png"
|
861
861
|
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
|
2
|
+
lightpdf_aipdf_mcp/common.py,sha256=_UO1f6S9Qr_3k6u5iBpdVDpvTK5U-tHEpu9KsDGqV8Y,6635
|
3
|
+
lightpdf_aipdf_mcp/converter.py,sha256=vdcir8O1_inbVmzjxcHlCDDr8Nzus1A5ARuVVXl-_1U,14669
|
4
|
+
lightpdf_aipdf_mcp/editor.py,sha256=O7wF_HWs5l-IiXLbZYLNYjj1ygo2v4yGJEYMJtn7jpo,26916
|
5
|
+
lightpdf_aipdf_mcp/server.py,sha256=maUfJ3CzhN70DWsguDLpLbK_dN9eVoW3Q93YnjaoC1I,47546
|
6
|
+
lightpdf_aipdf_mcp-0.1.81.dist-info/METADATA,sha256=1JS066slvy3eIYldnmOJsbVX7Y0gr_oicx2KRevzbm8,8119
|
7
|
+
lightpdf_aipdf_mcp-0.1.81.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
+
lightpdf_aipdf_mcp-0.1.81.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
|
9
|
+
lightpdf_aipdf_mcp-0.1.81.dist-info/RECORD,,
|
@@ -1,9 +0,0 @@
|
|
1
|
-
lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6s,141
|
2
|
-
lightpdf_aipdf_mcp/common.py,sha256=_UO1f6S9Qr_3k6u5iBpdVDpvTK5U-tHEpu9KsDGqV8Y,6635
|
3
|
-
lightpdf_aipdf_mcp/converter.py,sha256=VUQ03z93KjVFd0ZXpqoptGKOobWTtHEPtKSvy6aen58,14605
|
4
|
-
lightpdf_aipdf_mcp/editor.py,sha256=jVYksqO68o-7jIiH93rkbL4roIg_ps3Gnewl3NtsLvQ,26788
|
5
|
-
lightpdf_aipdf_mcp/server.py,sha256=gVu99QUN-9impuOMQnAfkBVtAaFF3lIsZuutb8pqVls,47395
|
6
|
-
lightpdf_aipdf_mcp-0.1.79.dist-info/METADATA,sha256=t81D_1PK3DShdSJ4Yl6637KWHoX3buUPSPsgtmVcrXY,8119
|
7
|
-
lightpdf_aipdf_mcp-0.1.79.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
8
|
-
lightpdf_aipdf_mcp-0.1.79.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
|
9
|
-
lightpdf_aipdf_mcp-0.1.79.dist-info/RECORD,,
|
File without changes
|
{lightpdf_aipdf_mcp-0.1.79.dist-info → lightpdf_aipdf_mcp-0.1.81.dist-info}/entry_points.txt
RENAMED
File without changes
|