mcpcn-office-powerpoint-mcp-server 2.0.7__py3-none-any.whl → 2.0.8__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.
- {mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info → mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info}/METADATA +2 -2
- {mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info → mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info}/RECORD +6 -6
- tools/content_tools.py +64 -1
- {mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info → mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info}/WHEEL +0 -0
- {mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info → mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info}/entry_points.txt +0 -0
- {mcpcn_office_powerpoint_mcp_server-2.0.7.dist-info → mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcpcn-office-powerpoint-mcp-server
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.8
|
|
4
4
|
Summary: MCP Server for PowerPoint manipulation using python-pptx - Consolidated Edition
|
|
5
5
|
Project-URL: Homepage, https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/GongRzhe/Office-PowerPoint-MCP-Server.git/issues
|
|
@@ -30,7 +30,7 @@ License-File: LICENSE
|
|
|
30
30
|
Classifier: License :: OSI Approved :: MIT License
|
|
31
31
|
Classifier: Operating System :: OS Independent
|
|
32
32
|
Classifier: Programming Language :: Python :: 3
|
|
33
|
-
Requires-Python: >=3.
|
|
33
|
+
Requires-Python: >=3.10
|
|
34
34
|
Requires-Dist: fonttools>=4.0.0
|
|
35
35
|
Requires-Dist: mcp[cli]>=1.3.0
|
|
36
36
|
Requires-Dist: pillow>=8.0.0
|
|
@@ -3,7 +3,7 @@ slide_layout_templates.json,sha256=ryA8zIZv6WBwjhBQaJXRWES3uqE7esqqFmXyiPEdauU,1
|
|
|
3
3
|
tools/__init__.py,sha256=b53px-U7Ny4-FMnAdFLoJMtPxD7lt7DB8ydvcdATCz0,983
|
|
4
4
|
tools/chart_tools.py,sha256=vvXI53gm9_2mfNOiG-qCfwLdqqr2pe_uDXHN9adVsZk,3124
|
|
5
5
|
tools/connector_tools.py,sha256=8cUPAfTZ-5vvooLCVQIWfblMzcFe3cPdh_bG5UezykQ,3402
|
|
6
|
-
tools/content_tools.py,sha256=
|
|
6
|
+
tools/content_tools.py,sha256=4tuFTPcDNnR3av1sp0ExgUueHVi6B5CzOjBqVscNV5E,28668
|
|
7
7
|
tools/hyperlink_tools.py,sha256=EweAxbYGvOpNpzDxH5DnrFzGMQmnzNGGehEoCCx9d18,5920
|
|
8
8
|
tools/master_tools.py,sha256=05a7ZUEDN5a7ySwG97Sj4UJK7Y0pcCxang553Bh7iOM,4986
|
|
9
9
|
tools/presentation_tools.py,sha256=rnVRYOu4A0Sw97sf8qKBK6-q5dYnK1vO2XNAzN8je4o,7977
|
|
@@ -18,8 +18,8 @@ utils/design_utils.py,sha256=vEstbqsBe202PYS4NvqdOLL3Aq5na7G2SBJnY-BYD_g,23761
|
|
|
18
18
|
utils/presentation_utils.py,sha256=9Y4F0twPvr0srjq53_Szkwxcn7dh06IWy3snRLaMuM8,6262
|
|
19
19
|
utils/template_utils.py,sha256=8iSJcJIgoOmi53TtlRnMwRLTDI84EfSW2PWj8EW3Z1k,44574
|
|
20
20
|
utils/validation_utils.py,sha256=0OiwFE1WZh05ZP-0hLzidyxKSUIJaJ3QrV0_s6FpxZk,11775
|
|
21
|
-
mcpcn_office_powerpoint_mcp_server-2.0.
|
|
22
|
-
mcpcn_office_powerpoint_mcp_server-2.0.
|
|
23
|
-
mcpcn_office_powerpoint_mcp_server-2.0.
|
|
24
|
-
mcpcn_office_powerpoint_mcp_server-2.0.
|
|
25
|
-
mcpcn_office_powerpoint_mcp_server-2.0.
|
|
21
|
+
mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info/METADATA,sha256=KIJW0ylNPFVOTYOOL-PmAjo0yJMuiJPZOwWxz0SSvqc,35856
|
|
22
|
+
mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
23
|
+
mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info/entry_points.txt,sha256=4iWuiBR6HdlTqSJjCVyqyqVGpSGiD4ssw7LkEzmgvXw,75
|
|
24
|
+
mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info/licenses/LICENSE,sha256=A-aSf9c0K2FKh7xtMkSr5Ot76NX8mrdLffsajnmZGKs,1064
|
|
25
|
+
mcpcn_office_powerpoint_mcp_server-2.0.8.dist-info/RECORD,,
|
tools/content_tools.py
CHANGED
|
@@ -492,7 +492,70 @@ def register_content_tools(app: FastMCP, presentations: Dict, get_current_presen
|
|
|
492
492
|
output_path: Optional[str] = None,
|
|
493
493
|
presentation_id: Optional[str] = None
|
|
494
494
|
) -> Dict:
|
|
495
|
-
"""
|
|
495
|
+
"""
|
|
496
|
+
统一的图片处理工具(添加/增强)。
|
|
497
|
+
|
|
498
|
+
功能
|
|
499
|
+
- operation="add":将图片插入到指定幻灯片位置,支持本地文件或 Base64 图片源。
|
|
500
|
+
- operation="enhance":对已有图片文件进行画质增强与风格化处理,输出增强后的图片路径。
|
|
501
|
+
|
|
502
|
+
参数
|
|
503
|
+
- slide_index: int — 目标幻灯片索引(从 0 开始)。
|
|
504
|
+
- operation: str — "add" 或 "enhance"。
|
|
505
|
+
- image_source: str —
|
|
506
|
+
* 当 source_type="file":本地图片文件路径。
|
|
507
|
+
* 当 source_type="base64":图片的 Base64 字符串。
|
|
508
|
+
- source_type: str — "file" 或 "base64"。
|
|
509
|
+
* add 支持 "file" 与 "base64"。
|
|
510
|
+
* enhance 仅支持 "file"(不接受 base64)。
|
|
511
|
+
- left, top: float — 插入位置(英寸)。
|
|
512
|
+
- width, height: Optional[float] — 插入尺寸(英寸)。可只提供一项以按比例缩放;都不提供则按图片原始尺寸。
|
|
513
|
+
- enhancement_style: Optional[str] — "presentation" 或 "custom"。当 operation="add" 且需要自动增强时可用;"presentation" 走预设的专业增强流程。
|
|
514
|
+
- brightness, contrast, saturation, sharpness: float — 亮度/对比度/饱和度/锐度(默认 1.0,>1 增强,<1 减弱)。
|
|
515
|
+
- blur_radius: float — 模糊半径(默认 0)。
|
|
516
|
+
- filter_type: Optional[str] — 过滤器类型(如 "DETAIL"、"SMOOTH" 等,取决于 Pillow 支持)。
|
|
517
|
+
- output_path: Optional[str] — 增强后图片的输出路径(不传则生成临时文件)。
|
|
518
|
+
- presentation_id: Optional[str] — 指定演示文稿 ID;不传则使用当前打开的演示文稿。
|
|
519
|
+
|
|
520
|
+
返回
|
|
521
|
+
- operation="add":
|
|
522
|
+
* message: str
|
|
523
|
+
* shape_index: int — 新增形状索引
|
|
524
|
+
* image_path: str(当 source_type="file" 时返回)
|
|
525
|
+
- operation="enhance":
|
|
526
|
+
* message: str
|
|
527
|
+
* enhanced_path: str — 增强后图片文件路径
|
|
528
|
+
- 失败时返回 {"error": str}
|
|
529
|
+
|
|
530
|
+
注意事项
|
|
531
|
+
- 当前不支持直接传入网络 URL。如需使用网络图片,请先下载为本地文件,或转为 Base64 后将 source_type 设为 "base64"。
|
|
532
|
+
- operation="enhance" 不接受 Base64,必须提供可访问的本地文件路径。
|
|
533
|
+
- 插入 Base64 图片时,内部会写入临时文件后再插入,操作完成后临时文件会被清理。
|
|
534
|
+
- slide_index 必须在当前演示文稿的有效范围内,否则将返回错误。
|
|
535
|
+
|
|
536
|
+
示例
|
|
537
|
+
- 插入本地图片:
|
|
538
|
+
manage_image(slide_index=0, operation="add",
|
|
539
|
+
image_source="D:/images/logo.png", source_type="file",
|
|
540
|
+
left=1.0, top=1.0, width=3.0)
|
|
541
|
+
|
|
542
|
+
- 插入 Base64 图片:
|
|
543
|
+
manage_image(slide_index=1, operation="add",
|
|
544
|
+
image_source="<BASE64字符串>", source_type="base64",
|
|
545
|
+
left=2.0, top=1.5, width=4.0, height=2.5)
|
|
546
|
+
|
|
547
|
+
- 插入并应用专业增强(演示风格):
|
|
548
|
+
manage_image(slide_index=2, operation="add",
|
|
549
|
+
image_source="assets/photo.jpg", source_type="file",
|
|
550
|
+
enhancement_style="presentation", left=1.0, top=2.0)
|
|
551
|
+
|
|
552
|
+
- 增强已有图片文件(自定义参数):
|
|
553
|
+
manage_image(slide_index=0, operation="enhance",
|
|
554
|
+
image_source="assets/photo.jpg", source_type="file",
|
|
555
|
+
brightness=1.2, contrast=1.1, saturation=1.3,
|
|
556
|
+
sharpness=1.1, blur_radius=0, filter_type=None,
|
|
557
|
+
output_path="assets/photo_enhanced.jpg")
|
|
558
|
+
"""
|
|
496
559
|
pres_id = presentation_id if presentation_id is not None else get_current_presentation_id()
|
|
497
560
|
|
|
498
561
|
if pres_id is None or pres_id not in presentations:
|
|
File without changes
|
|
File without changes
|