lightpdf-aipdf-mcp 0.1.93__py3-none-any.whl → 0.1.95__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.
@@ -1042,9 +1042,13 @@ async def handle_list_tools() -> list[types.Tool]:
1042
1042
  "required": ["path"]
1043
1043
  },
1044
1044
  "description": "List of PDF files to restrict printing, each containing path and optional password"
1045
+ },
1046
+ "password": {
1047
+ "type": "string",
1048
+ "description": "New password to set"
1045
1049
  }
1046
1050
  },
1047
- "required": ["files"]
1051
+ "required": ["files", "password"]
1048
1052
  }
1049
1053
  ),
1050
1054
  types.Tool(
@@ -1097,7 +1101,7 @@ async def handle_list_tools() -> list[types.Tool]:
1097
1101
  }
1098
1102
  ),
1099
1103
  types.Tool(
1100
- name="resize-pdf",
1104
+ name="resize_pdf",
1101
1105
  description="Resize PDF pages. You can specify the target page size (a0/a1/a2/a3/a4/a5/a6/letter) and/or the image resolution (dpi, e.g., 72). If not set, the corresponding property will not be changed.",
1102
1106
  inputSchema={
1103
1107
  "type": "object",
@@ -1162,7 +1166,7 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
1162
1166
  "format": "flatten-pdf", # 固定format
1163
1167
  "is_edit_operation": False
1164
1168
  },
1165
- "resize-pdf": {
1169
+ "resize_pdf": {
1166
1170
  "format": "resize-pdf",
1167
1171
  "is_edit_operation": False,
1168
1172
  "param_keys": ["page_size", "resolution"]
@@ -1187,6 +1191,11 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
1187
1191
  "is_edit_operation": True, # 标记为编辑操作
1188
1192
  "param_keys": ["password"] # 需要从arguments获取的参数
1189
1193
  },
1194
+ "restrict_printing": {
1195
+ "edit_type": "encrypt", # 或protect,和protect_pdf一致
1196
+ "is_edit_operation": True,
1197
+ "param_keys": ["password"] # 增加password参数
1198
+ },
1190
1199
  "compress_pdf": {
1191
1200
  "edit_type": "compress", # 编辑类型
1192
1201
  "is_edit_operation": True, # 标记为编辑操作
@@ -1215,11 +1224,6 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
1215
1224
  "is_edit_operation": True, # 标记为编辑操作
1216
1225
  "param_keys": ["format"] # 需要从arguments获取的参数
1217
1226
  },
1218
- "restrict_printing": {
1219
- "edit_type": "encrypt", # 或protect,和protect_pdf一致
1220
- "is_edit_operation": True,
1221
- "param_keys": [] # 不暴露provider
1222
- },
1223
1227
  "translate_pdf": {
1224
1228
  "is_translate_operation": True,
1225
1229
  "param_keys": ["source", "target", "output_type"]
@@ -1290,6 +1294,9 @@ async def handle_call_tool(name: str, arguments: dict | None) -> list[types.Text
1290
1294
  # restrict_printing工具自动加provider参数
1291
1295
  if name == "restrict_printing":
1292
1296
  operation_config["extra_params"]["provider"] = "printpermission"
1297
+ # 确保password参数传递,与protect_pdf一致
1298
+ if "password" in arguments:
1299
+ operation_config["extra_params"]["password"] = arguments["password"]
1293
1300
 
1294
1301
  # 特殊处理merge_pdfs工具
1295
1302
  if name == "merge_pdfs":
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lightpdf-aipdf-mcp
3
- Version: 0.1.93
3
+ Version: 0.1.95
4
4
  Summary: MCP Server for LightPDF AI-PDF
5
5
  Author: LightPDF Team
6
6
  License: Proprietary
@@ -2,9 +2,9 @@ lightpdf_aipdf_mcp/__init__.py,sha256=PPnAgpvJLYLVOTxnHDmJAulFnHJD6wuTwS6tRGjqq6
2
2
  lightpdf_aipdf_mcp/common.py,sha256=_UO1f6S9Qr_3k6u5iBpdVDpvTK5U-tHEpu9KsDGqV8Y,6635
3
3
  lightpdf_aipdf_mcp/converter.py,sha256=Q_4vXcysqcJ7w6bUKY9JhoBDlCRcAJSpW7p0jh5qekU,16120
4
4
  lightpdf_aipdf_mcp/editor.py,sha256=CjxcZh-zDmb9UjHYj5spfx9HK8j-_voZ3_nmdwWGM8c,29908
5
- lightpdf_aipdf_mcp/server.py,sha256=uLb_gOB1uP6eN53BDMp2qLXQk_9GjKJjYJDSjb75iyo,62324
5
+ lightpdf_aipdf_mcp/server.py,sha256=YJ9qFxyt64K36QE0vqngjZmA0GvSwkiRiXUTgrlXpjc,62710
6
6
  lightpdf_aipdf_mcp/translator.py,sha256=NbFDz-mZSD4qCNQVyV0W_0x6xXwbqs_7FiBU13JAxZs,4243
7
- lightpdf_aipdf_mcp-0.1.93.dist-info/METADATA,sha256=yzoh3896I5aeCPg6gI_Hi1GEkW2QHPygSDMZ7PLv98Y,8119
8
- lightpdf_aipdf_mcp-0.1.93.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- lightpdf_aipdf_mcp-0.1.93.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
10
- lightpdf_aipdf_mcp-0.1.93.dist-info/RECORD,,
7
+ lightpdf_aipdf_mcp-0.1.95.dist-info/METADATA,sha256=24xEiXcTBQ5c8JsuCrbQtX1Sj9dWNHxwqPzMWrKlgCA,8119
8
+ lightpdf_aipdf_mcp-0.1.95.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ lightpdf_aipdf_mcp-0.1.95.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
10
+ lightpdf_aipdf_mcp-0.1.95.dist-info/RECORD,,