lightpdf-aipdf-mcp 0.1.134__py3-none-any.whl → 0.1.136__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/server.py +8 -1
- {lightpdf_aipdf_mcp-0.1.134.dist-info → lightpdf_aipdf_mcp-0.1.136.dist-info}/METADATA +1 -1
- {lightpdf_aipdf_mcp-0.1.134.dist-info → lightpdf_aipdf_mcp-0.1.136.dist-info}/RECORD +5 -5
- {lightpdf_aipdf_mcp-0.1.134.dist-info → lightpdf_aipdf_mcp-0.1.136.dist-info}/WHEEL +0 -0
- {lightpdf_aipdf_mcp-0.1.134.dist-info → lightpdf_aipdf_mcp-0.1.136.dist-info}/entry_points.txt +0 -0
lightpdf_aipdf_mcp/server.py
CHANGED
@@ -6,6 +6,7 @@ import sys
|
|
6
6
|
import argparse
|
7
7
|
import json
|
8
8
|
from typing import List, Dict, Any, Callable, TypeVar, Optional, Union
|
9
|
+
from urllib.request import url2pathname
|
9
10
|
|
10
11
|
# 第三方库导入
|
11
12
|
from dotenv import load_dotenv
|
@@ -434,7 +435,7 @@ async def handle_list_tools() -> list[types.Tool]:
|
|
434
435
|
return [
|
435
436
|
types.Tool(
|
436
437
|
name="convert_document",
|
437
|
-
description="Document format conversion tool.\n\nPDF can be converted to: DOCX, XLSX, PPTX, images (including long images), HTML, TXT (text extraction), CSV, MD (Markdown), or TEX (LaTeX).\nOther formats (DOCX, XLSX, PPTX, images, CAD, CAJ, OFD, HTML, TEX (LaTeX), TXT, ODT) can be converted to PDF. For HTML to PDF, both local HTML files and any web page URL are supported.\n\nPDF to PDF conversion is not supported.\nOnly entire files can be converted.\
|
438
|
+
description="Document format conversion tool.\n\nPDF can be converted to: DOCX, XLSX, PPTX, images (including long images), HTML, TXT (text extraction), CSV, MD (Markdown), or TEX (LaTeX).\nOther formats (DOCX, XLSX, PPTX, images, CAD, CAJ, OFD, HTML, TEX (LaTeX), TXT, ODT) can be converted to PDF. For HTML to PDF, both local HTML files and any web page URL are supported.\n\nPDF to PDF conversion is not supported.\nOnly entire files can be converted.\nFor content-based PDF creation, please use the create_pdf tool. This tool is strictly for file format conversion only.",
|
438
439
|
inputSchema={
|
439
440
|
"type": "object",
|
440
441
|
"properties": {
|
@@ -1303,6 +1304,12 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
|
|
1303
1304
|
if isinstance(file_objects, dict):
|
1304
1305
|
file_objects = [file_objects]
|
1305
1306
|
|
1307
|
+
# file_objects中的path需要处理file://协议
|
1308
|
+
for file_obj in file_objects:
|
1309
|
+
path = file_obj.get("path")
|
1310
|
+
if path and path.startswith("file://"):
|
1311
|
+
file_obj["path"] = url2pathname(path.removeprefix('file:'))
|
1312
|
+
|
1306
1313
|
config = TOOL_CONFIG[name]
|
1307
1314
|
operation_config = dict(config) # 复制配置
|
1308
1315
|
|
@@ -3,9 +3,9 @@ lightpdf_aipdf_mcp/common.py,sha256=PhTf7Zg6mEgn1rTmJDHotXp-4xb2gWFf-Dy_t25qNdY,
|
|
3
3
|
lightpdf_aipdf_mcp/converter.py,sha256=XTrMwzXUV1eG_Wlr6l0HrdL9UlEMS4ediVSrBX7YHUM,17090
|
4
4
|
lightpdf_aipdf_mcp/create_pdf.py,sha256=oALIhOBo60D3Gu_li7d7FF0COhFfSTM-BJpc63r9iAs,2465
|
5
5
|
lightpdf_aipdf_mcp/editor.py,sha256=cYJ6NlS9q_HJwL-Aw7mVwCT5CECMLWYlmR_ePhw_Ja4,30081
|
6
|
-
lightpdf_aipdf_mcp/server.py,sha256=
|
6
|
+
lightpdf_aipdf_mcp/server.py,sha256=huFvfA77pcDIfU2NOD5Fk0T6vwawnoCjlifJIf_HXUc,66983
|
7
7
|
lightpdf_aipdf_mcp/translator.py,sha256=NbFDz-mZSD4qCNQVyV0W_0x6xXwbqs_7FiBU13JAxZs,4243
|
8
|
-
lightpdf_aipdf_mcp-0.1.
|
9
|
-
lightpdf_aipdf_mcp-0.1.
|
10
|
-
lightpdf_aipdf_mcp-0.1.
|
11
|
-
lightpdf_aipdf_mcp-0.1.
|
8
|
+
lightpdf_aipdf_mcp-0.1.136.dist-info/METADATA,sha256=MUl3xxU0cN9YC1FlIzzTwTNTpJV9wK9s5Ics3gMKwbo,8120
|
9
|
+
lightpdf_aipdf_mcp-0.1.136.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
10
|
+
lightpdf_aipdf_mcp-0.1.136.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
|
11
|
+
lightpdf_aipdf_mcp-0.1.136.dist-info/RECORD,,
|
File without changes
|
{lightpdf_aipdf_mcp-0.1.134.dist-info → lightpdf_aipdf_mcp-0.1.136.dist-info}/entry_points.txt
RENAMED
File without changes
|