lightpdf-aipdf-mcp 0.1.94__py3-none-any.whl → 0.1.96__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.
@@ -1017,7 +1017,7 @@ async def handle_list_tools() -> list[types.Tool]:
1017
1017
  ),
1018
1018
  types.Tool(
1019
1019
  name="restrict_printing",
1020
- description="Restrict PDF printing permission. This tool will set the PDF so that printing is not allowed.",
1020
+ description="Restrict PDF printing permission. This tool will set a password to the PDF so that printing is not allowed.",
1021
1021
  inputSchema={
1022
1022
  "type": "object",
1023
1023
  "properties": {
@@ -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(
@@ -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.94
3
+ Version: 0.1.96
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=HaUmJIZC-uoKEtV3oiEHhHHsrwP8VDCEG19xlXhf3lk,62324
5
+ lightpdf_aipdf_mcp/server.py,sha256=laUji3xH4e9Ux1DAk60Ge5EaLCkc5uz4BvFDvZ3i_ZQ,62724
6
6
  lightpdf_aipdf_mcp/translator.py,sha256=NbFDz-mZSD4qCNQVyV0W_0x6xXwbqs_7FiBU13JAxZs,4243
7
- lightpdf_aipdf_mcp-0.1.94.dist-info/METADATA,sha256=sDIK2DUTFKvCiQftB2UH94YMVm13qRT8ouS4xOzciLQ,8119
8
- lightpdf_aipdf_mcp-0.1.94.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- lightpdf_aipdf_mcp-0.1.94.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
10
- lightpdf_aipdf_mcp-0.1.94.dist-info/RECORD,,
7
+ lightpdf_aipdf_mcp-0.1.96.dist-info/METADATA,sha256=RzrgGATN3R85mxOHOCRAdOOeRams4cR6L76ZhwKxJRg,8119
8
+ lightpdf_aipdf_mcp-0.1.96.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ lightpdf_aipdf_mcp-0.1.96.dist-info/entry_points.txt,sha256=X7TGUe52N4sYH-tYt0YUGApeJgw-efQlZA6uAZmlmr4,63
10
+ lightpdf_aipdf_mcp-0.1.96.dist-info/RECORD,,