mcpcn-office-powerpoint-mcp-server 2.1.1__py3-none-any.whl → 2.1.2__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.1.1.dist-info → mcpcn_office_powerpoint_mcp_server-2.1.2.dist-info}/METADATA +82 -30
- mcpcn_office_powerpoint_mcp_server-2.1.2.dist-info/RECORD +25 -0
- {mcpcn_office_powerpoint_mcp_server-2.1.1.dist-info → mcpcn_office_powerpoint_mcp_server-2.1.2.dist-info}/WHEEL +1 -1
- {mcpcn_office_powerpoint_mcp_server-2.1.1.dist-info → mcpcn_office_powerpoint_mcp_server-2.1.2.dist-info}/licenses/LICENSE +20 -20
- ppt_mcp_server.py +474 -474
- slide_layout_templates.json +3689 -3689
- tools/__init__.py +27 -27
- tools/chart_tools.py +81 -81
- tools/connector_tools.py +90 -90
- tools/content_tools.py +966 -778
- tools/hyperlink_tools.py +137 -137
- tools/master_tools.py +113 -113
- tools/presentation_tools.py +211 -211
- tools/professional_tools.py +289 -289
- tools/structural_tools.py +372 -372
- tools/template_tools.py +520 -520
- tools/transition_tools.py +74 -74
- utils/__init__.py +69 -68
- utils/content_utils.py +633 -578
- utils/core_utils.py +54 -54
- utils/design_utils.py +688 -688
- utils/presentation_utils.py +216 -216
- utils/template_utils.py +1142 -1142
- utils/validation_utils.py +322 -322
- mcpcn_office_powerpoint_mcp_server-2.1.1.dist-info/RECORD +0 -25
- {mcpcn_office_powerpoint_mcp_server-2.1.1.dist-info → mcpcn_office_powerpoint_mcp_server-2.1.2.dist-info}/entry_points.txt +0 -0
tools/transition_tools.py
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"""
|
|
2
|
-
Slide transition management tools for PowerPoint MCP Server.
|
|
3
|
-
Implements slide transition and timing capabilities.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from typing import Dict, List, Optional, Any
|
|
7
|
-
|
|
8
|
-
def register_transition_tools(app, presentations, get_current_presentation_id, validate_parameters,
|
|
9
|
-
is_positive, is_non_negative, is_in_range, is_valid_rgb):
|
|
10
|
-
"""Register slide transition management tools with the FastMCP app."""
|
|
11
|
-
|
|
12
|
-
@app.tool()
|
|
13
|
-
def manage_slide_transitions(
|
|
14
|
-
slide_index: int,
|
|
15
|
-
operation: str,
|
|
16
|
-
transition_type: str = None,
|
|
17
|
-
duration: float = 1.0,
|
|
18
|
-
presentation_id: str = None
|
|
19
|
-
) -> Dict:
|
|
20
|
-
"""
|
|
21
|
-
Manage slide transitions and timing.
|
|
22
|
-
|
|
23
|
-
Args:
|
|
24
|
-
slide_index: Index of the slide (0-based)
|
|
25
|
-
operation: Operation type ("set", "remove", "get")
|
|
26
|
-
transition_type: Type of transition (basic support)
|
|
27
|
-
duration: Duration of transition in seconds
|
|
28
|
-
presentation_id: Optional presentation ID (uses current if not provided)
|
|
29
|
-
|
|
30
|
-
Returns:
|
|
31
|
-
Dictionary with transition information
|
|
32
|
-
"""
|
|
33
|
-
try:
|
|
34
|
-
# Get presentation
|
|
35
|
-
pres_id = presentation_id or get_current_presentation_id()
|
|
36
|
-
if pres_id not in presentations:
|
|
37
|
-
return {"error": "Presentation not found"}
|
|
38
|
-
|
|
39
|
-
pres = presentations[pres_id]
|
|
40
|
-
|
|
41
|
-
# Validate slide index
|
|
42
|
-
if not (0 <= slide_index < len(pres.slides)):
|
|
43
|
-
return {"error": f"Slide index {slide_index} out of range"}
|
|
44
|
-
|
|
45
|
-
slide = pres.slides[slide_index]
|
|
46
|
-
|
|
47
|
-
if operation == "get":
|
|
48
|
-
# Get current transition info (limited python-pptx support)
|
|
49
|
-
return {
|
|
50
|
-
"message": f"Transition info for slide {slide_index}",
|
|
51
|
-
"slide_index": slide_index,
|
|
52
|
-
"note": "Transition reading has limited support in python-pptx"
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
elif operation == "set":
|
|
56
|
-
return {
|
|
57
|
-
"message": f"Transition setting requested for slide {slide_index}",
|
|
58
|
-
"slide_index": slide_index,
|
|
59
|
-
"transition_type": transition_type,
|
|
60
|
-
"duration": duration,
|
|
61
|
-
"note": "Transition setting has limited support in python-pptx - this is a placeholder for future enhancement"
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
elif operation == "remove":
|
|
65
|
-
return {
|
|
66
|
-
"message": f"Transition removal requested for slide {slide_index}",
|
|
67
|
-
"slide_index": slide_index,
|
|
68
|
-
"note": "Transition removal has limited support in python-pptx - this is a placeholder for future enhancement"
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
else:
|
|
72
|
-
return {"error": f"Unsupported operation: {operation}. Use 'set', 'remove', or 'get'"}
|
|
73
|
-
|
|
74
|
-
except Exception as e:
|
|
1
|
+
"""
|
|
2
|
+
Slide transition management tools for PowerPoint MCP Server.
|
|
3
|
+
Implements slide transition and timing capabilities.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from typing import Dict, List, Optional, Any
|
|
7
|
+
|
|
8
|
+
def register_transition_tools(app, presentations, get_current_presentation_id, validate_parameters,
|
|
9
|
+
is_positive, is_non_negative, is_in_range, is_valid_rgb):
|
|
10
|
+
"""Register slide transition management tools with the FastMCP app."""
|
|
11
|
+
|
|
12
|
+
@app.tool()
|
|
13
|
+
def manage_slide_transitions(
|
|
14
|
+
slide_index: int,
|
|
15
|
+
operation: str,
|
|
16
|
+
transition_type: str = None,
|
|
17
|
+
duration: float = 1.0,
|
|
18
|
+
presentation_id: str = None
|
|
19
|
+
) -> Dict:
|
|
20
|
+
"""
|
|
21
|
+
Manage slide transitions and timing.
|
|
22
|
+
|
|
23
|
+
Args:
|
|
24
|
+
slide_index: Index of the slide (0-based)
|
|
25
|
+
operation: Operation type ("set", "remove", "get")
|
|
26
|
+
transition_type: Type of transition (basic support)
|
|
27
|
+
duration: Duration of transition in seconds
|
|
28
|
+
presentation_id: Optional presentation ID (uses current if not provided)
|
|
29
|
+
|
|
30
|
+
Returns:
|
|
31
|
+
Dictionary with transition information
|
|
32
|
+
"""
|
|
33
|
+
try:
|
|
34
|
+
# Get presentation
|
|
35
|
+
pres_id = presentation_id or get_current_presentation_id()
|
|
36
|
+
if pres_id not in presentations:
|
|
37
|
+
return {"error": "Presentation not found"}
|
|
38
|
+
|
|
39
|
+
pres = presentations[pres_id]
|
|
40
|
+
|
|
41
|
+
# Validate slide index
|
|
42
|
+
if not (0 <= slide_index < len(pres.slides)):
|
|
43
|
+
return {"error": f"Slide index {slide_index} out of range"}
|
|
44
|
+
|
|
45
|
+
slide = pres.slides[slide_index]
|
|
46
|
+
|
|
47
|
+
if operation == "get":
|
|
48
|
+
# Get current transition info (limited python-pptx support)
|
|
49
|
+
return {
|
|
50
|
+
"message": f"Transition info for slide {slide_index}",
|
|
51
|
+
"slide_index": slide_index,
|
|
52
|
+
"note": "Transition reading has limited support in python-pptx"
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
elif operation == "set":
|
|
56
|
+
return {
|
|
57
|
+
"message": f"Transition setting requested for slide {slide_index}",
|
|
58
|
+
"slide_index": slide_index,
|
|
59
|
+
"transition_type": transition_type,
|
|
60
|
+
"duration": duration,
|
|
61
|
+
"note": "Transition setting has limited support in python-pptx - this is a placeholder for future enhancement"
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
elif operation == "remove":
|
|
65
|
+
return {
|
|
66
|
+
"message": f"Transition removal requested for slide {slide_index}",
|
|
67
|
+
"slide_index": slide_index,
|
|
68
|
+
"note": "Transition removal has limited support in python-pptx - this is a placeholder for future enhancement"
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
else:
|
|
72
|
+
return {"error": f"Unsupported operation: {operation}. Use 'set', 'remove', or 'get'"}
|
|
73
|
+
|
|
74
|
+
except Exception as e:
|
|
75
75
|
return {"error": f"Failed to manage slide transitions: {str(e)}"}
|
utils/__init__.py
CHANGED
|
@@ -1,69 +1,70 @@
|
|
|
1
|
-
"""
|
|
2
|
-
PowerPoint utilities package.
|
|
3
|
-
Organized utility functions for PowerPoint manipulation.
|
|
4
|
-
"""
|
|
5
|
-
|
|
6
|
-
from .core_utils import *
|
|
7
|
-
from .presentation_utils import *
|
|
8
|
-
from .content_utils import *
|
|
9
|
-
from .design_utils import *
|
|
10
|
-
from .validation_utils import *
|
|
11
|
-
|
|
12
|
-
__all__ = [
|
|
13
|
-
# Core utilities
|
|
14
|
-
"safe_operation",
|
|
15
|
-
"try_multiple_approaches",
|
|
16
|
-
|
|
17
|
-
# Presentation utilities
|
|
18
|
-
"create_presentation",
|
|
19
|
-
"open_presentation",
|
|
20
|
-
"save_presentation",
|
|
21
|
-
"create_presentation_from_template",
|
|
22
|
-
"get_presentation_info",
|
|
23
|
-
"get_template_info",
|
|
24
|
-
"set_core_properties",
|
|
25
|
-
"get_core_properties",
|
|
26
|
-
|
|
27
|
-
# Content utilities
|
|
28
|
-
"add_slide",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
"
|
|
45
|
-
"
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
"
|
|
1
|
+
"""
|
|
2
|
+
PowerPoint utilities package.
|
|
3
|
+
Organized utility functions for PowerPoint manipulation.
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
from .core_utils import *
|
|
7
|
+
from .presentation_utils import *
|
|
8
|
+
from .content_utils import *
|
|
9
|
+
from .design_utils import *
|
|
10
|
+
from .validation_utils import *
|
|
11
|
+
|
|
12
|
+
__all__ = [
|
|
13
|
+
# Core utilities
|
|
14
|
+
"safe_operation",
|
|
15
|
+
"try_multiple_approaches",
|
|
16
|
+
|
|
17
|
+
# Presentation utilities
|
|
18
|
+
"create_presentation",
|
|
19
|
+
"open_presentation",
|
|
20
|
+
"save_presentation",
|
|
21
|
+
"create_presentation_from_template",
|
|
22
|
+
"get_presentation_info",
|
|
23
|
+
"get_template_info",
|
|
24
|
+
"set_core_properties",
|
|
25
|
+
"get_core_properties",
|
|
26
|
+
|
|
27
|
+
# Content utilities
|
|
28
|
+
"add_slide",
|
|
29
|
+
"move_slide",
|
|
30
|
+
"get_slide_info",
|
|
31
|
+
"set_title",
|
|
32
|
+
"populate_placeholder",
|
|
33
|
+
"add_bullet_points",
|
|
34
|
+
"add_textbox",
|
|
35
|
+
"format_text",
|
|
36
|
+
"format_text_advanced",
|
|
37
|
+
"add_image",
|
|
38
|
+
"add_table",
|
|
39
|
+
"format_table_cell",
|
|
40
|
+
"add_chart",
|
|
41
|
+
"format_chart",
|
|
42
|
+
|
|
43
|
+
# Design utilities
|
|
44
|
+
"get_professional_color",
|
|
45
|
+
"get_professional_font",
|
|
46
|
+
"get_color_schemes",
|
|
47
|
+
"add_professional_slide",
|
|
48
|
+
"apply_professional_theme",
|
|
49
|
+
"enhance_existing_slide",
|
|
50
|
+
"apply_professional_image_enhancement",
|
|
51
|
+
"enhance_image_with_pillow",
|
|
52
|
+
"set_slide_gradient_background",
|
|
53
|
+
"create_professional_gradient_background",
|
|
54
|
+
"format_shape",
|
|
55
|
+
"apply_picture_shadow",
|
|
56
|
+
"apply_picture_reflection",
|
|
57
|
+
"apply_picture_glow",
|
|
58
|
+
"apply_picture_soft_edges",
|
|
59
|
+
"apply_picture_rotation",
|
|
60
|
+
"apply_picture_transparency",
|
|
61
|
+
"apply_picture_bevel",
|
|
62
|
+
"apply_picture_filter",
|
|
63
|
+
"analyze_font_file",
|
|
64
|
+
"optimize_font_for_presentation",
|
|
65
|
+
"get_font_recommendations",
|
|
66
|
+
|
|
67
|
+
# Validation utilities
|
|
68
|
+
"validate_text_fit",
|
|
69
|
+
"validate_and_fix_slide"
|
|
69
70
|
]
|