media-agent-mcp 0.3.4__py3-none-any.whl → 0.3.5__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.
@@ -27,15 +27,15 @@ from mcp.server.fastmcp import FastMCP
27
27
 
28
28
  # Import async wrappers
29
29
  from media_agent_mcp.async_wrapper import (
30
- async_video_concat_tool,
31
- async_video_last_frame_tool,
32
- async_seedream_generate_image_tool,
33
- async_seedance_generate_video_tool,
34
- async_seededit_tool,
35
- async_vlm_vision_task_tool,
36
- async_image_selector_tool,
37
- async_video_selector_tool,
38
- async_tos_save_content_tool,
30
+ video_concat_tool,
31
+ video_last_frame_tool,
32
+ seedream_generate_image_tool,
33
+ seedance_generate_video_tool,
34
+ seededit_tool,
35
+ vlm_vision_task_tool,
36
+ image_selector_tool,
37
+ video_selector_tool,
38
+ tos_save_content_tool,
39
39
  cleanup_executor
40
40
  )
41
41
 
@@ -49,7 +49,7 @@ mcp = FastMCP("Media-Agent-MCP-Async")
49
49
 
50
50
 
51
51
  @mcp.tool()
52
- async def video_concat_tool_async(video_urls: List[str]) -> str:
52
+ async def video_concat_tool(video_urls: List[str]) -> str:
53
53
  """
54
54
  Asynchronously concatenate multiple videos from URLs and upload to TOS.
55
55
 
@@ -59,11 +59,11 @@ async def video_concat_tool_async(video_urls: List[str]) -> str:
59
59
  Returns:
60
60
  JSON string with status, data, and message
61
61
  """
62
- return await async_video_concat_tool(video_urls)
62
+ return await video_concat_tool(video_urls)
63
63
 
64
64
 
65
65
  @mcp.tool()
66
- async def video_last_frame_tool_async(video_url: str) -> str:
66
+ async def video_last_frame_tool(video_url: str) -> str:
67
67
  """
68
68
  Asynchronously extract the last frame from a video file and upload to TOS.
69
69
 
@@ -73,11 +73,11 @@ async def video_last_frame_tool_async(video_url: str) -> str:
73
73
  Returns:
74
74
  JSON string with status, data, and message
75
75
  """
76
- return await async_video_last_frame_tool(video_url)
76
+ return await video_last_frame_tool(video_url)
77
77
 
78
78
 
79
79
  @mcp.tool()
80
- async def seedream_generate_image_tool_async(prompt: str, size: str = "1024x1024") -> str:
80
+ async def seedream_generate_image_tool(prompt: str, size: str = "1024x1024") -> str:
81
81
  """
82
82
  Asynchronously generate an image using Seedream AI model.
83
83
 
@@ -88,11 +88,11 @@ async def seedream_generate_image_tool_async(prompt: str, size: str = "1024x1024
88
88
  Returns:
89
89
  JSON string with status, data, and message
90
90
  """
91
- return await async_seedream_generate_image_tool(prompt, size)
91
+ return await seedream_generate_image_tool(prompt, size)
92
92
 
93
93
 
94
94
  @mcp.tool()
95
- async def seedance_generate_video_tool_async(prompt: str, first_frame_image: str,
95
+ async def seedance_generate_video_tool(prompt: str, first_frame_image: str,
96
96
  last_frame_image: str = None, duration: int = 5,
97
97
  resolution: str = "720p") -> str:
98
98
  """
@@ -108,11 +108,11 @@ async def seedance_generate_video_tool_async(prompt: str, first_frame_image: str
108
108
  Returns:
109
109
  JSON string with status, data, and message
110
110
  """
111
- return await async_seedance_generate_video_tool(prompt, first_frame_image, last_frame_image, duration, resolution)
111
+ return await seedance_generate_video_tool(prompt, first_frame_image, last_frame_image, duration, resolution)
112
112
 
113
113
 
114
114
  @mcp.tool()
115
- async def seededit_tool_async(image_url: str, prompt: str, seed: int = -1,
115
+ async def seededit_tool(image_url: str, prompt: str, seed: int = -1,
116
116
  scale: float = 0.5, charactor_keep: bool = False) -> str:
117
117
  """
118
118
  Asynchronously edit an image using Seededit model.
@@ -127,11 +127,11 @@ async def seededit_tool_async(image_url: str, prompt: str, seed: int = -1,
127
127
  Returns:
128
128
  JSON string with status, data, and message
129
129
  """
130
- return await async_seededit_tool(image_url, prompt, seed, scale, charactor_keep)
130
+ return await seededit_tool(image_url, prompt, seed, scale, charactor_keep)
131
131
 
132
132
 
133
133
  @mcp.tool()
134
- async def vlm_vision_task_tool_async(messages: List) -> str:
134
+ async def vlm_vision_task_tool(messages: List) -> str:
135
135
  """
136
136
  Asynchronously perform vision-language tasks using VLM model.
137
137
 
@@ -141,11 +141,11 @@ async def vlm_vision_task_tool_async(messages: List) -> str:
141
141
  Returns:
142
142
  JSON string with status, data, and message
143
143
  """
144
- return await async_vlm_vision_task_tool(messages)
144
+ return await vlm_vision_task_tool(messages)
145
145
 
146
146
 
147
147
  @mcp.tool()
148
- async def image_selector_tool_async(image_paths: List[str], prompt: str) -> str:
148
+ async def image_selector_tool(image_paths: List[str], prompt: str) -> str:
149
149
  """
150
150
  Asynchronously select the best image from multiple options using VLM model.
151
151
 
@@ -156,11 +156,11 @@ async def image_selector_tool_async(image_paths: List[str], prompt: str) -> str:
156
156
  Returns:
157
157
  JSON string with status, data, and message
158
158
  """
159
- return await async_image_selector_tool(image_paths, prompt)
159
+ return await image_selector_tool(image_paths, prompt)
160
160
 
161
161
 
162
162
  @mcp.tool()
163
- async def video_selector_tool_async(video_paths: List[str], prompt: str) -> str:
163
+ async def video_selector_tool(video_paths: List[str], prompt: str) -> str:
164
164
  """
165
165
  Asynchronously select the best video from multiple options using VLM model.
166
166
 
@@ -171,11 +171,11 @@ async def video_selector_tool_async(video_paths: List[str], prompt: str) -> str:
171
171
  Returns:
172
172
  JSON string with status, data, and message
173
173
  """
174
- return await async_video_selector_tool(video_paths, prompt)
174
+ return await video_selector_tool(video_paths, prompt)
175
175
 
176
176
 
177
177
  @mcp.tool()
178
- async def tos_save_content_tool_async(content: str, file_extension: str = "txt",
178
+ async def tos_save_content_tool(content: str, file_extension: str = "txt",
179
179
  object_key: Optional[str] = None) -> str:
180
180
  """
181
181
  Asynchronously save content to TOS and return URL.
@@ -188,7 +188,7 @@ async def tos_save_content_tool_async(content: str, file_extension: str = "txt",
188
188
  Returns:
189
189
  JSON string with status, data, and message
190
190
  """
191
- return await async_tos_save_content_tool(content, file_extension, object_key)
191
+ return await tos_save_content_tool(content, file_extension, object_key)
192
192
 
193
193
 
194
194
  # Utility function for concurrent execution
@@ -85,28 +85,28 @@ def json_response_wrapper(func: Callable) -> Callable:
85
85
  # Async wrapped functions
86
86
  @async_wrapper
87
87
  @json_response_wrapper
88
- def _sync_video_concat(video_urls: List[str]) -> str:
88
+ def video_concat_tool(video_urls: List[str]) -> str:
89
89
  """Synchronous video concatenation wrapper."""
90
90
  return concat_videos(video_urls)
91
91
 
92
92
 
93
93
  @async_wrapper
94
94
  @json_response_wrapper
95
- def _sync_video_last_frame(video_url: str) -> str:
95
+ def video_last_frame_tool(video_url: str) -> str:
96
96
  """Synchronous video last frame extraction wrapper."""
97
97
  return extract_last_frame(video_url)
98
98
 
99
99
 
100
100
  @async_wrapper
101
101
  @json_response_wrapper
102
- def _sync_seedream_generate_image(prompt: str, size: str = "1024x1024") -> str:
102
+ def seedream_generate_image_tool(prompt: str, size: str = "1024x1024") -> str:
103
103
  """Synchronous image generation wrapper."""
104
104
  return generate_image(prompt, size=size)
105
105
 
106
106
 
107
107
  @async_wrapper
108
108
  @json_response_wrapper
109
- def _sync_seedance_generate_video(prompt: str, first_frame_image: str,
109
+ def seedance_generate_video_tool(prompt: str, first_frame_image: str,
110
110
  last_frame_image: str = None, duration: int = 5,
111
111
  resolution: str = "720p") -> str:
112
112
  """Synchronous video generation wrapper."""
@@ -128,7 +128,7 @@ def _sync_seedance_generate_video(prompt: str, first_frame_image: str,
128
128
 
129
129
  @async_wrapper
130
130
  @json_response_wrapper
131
- def _sync_seededit(image_url: str, prompt: str, seed: int = -1,
131
+ def seededit_tool(image_url: str, prompt: str, seed: int = -1,
132
132
  scale: float = 0.5, charactor_keep: bool = False) -> str:
133
133
  """Synchronous image editing wrapper."""
134
134
  return seededit(
@@ -143,14 +143,14 @@ def _sync_seededit(image_url: str, prompt: str, seed: int = -1,
143
143
 
144
144
  @async_wrapper
145
145
  @json_response_wrapper
146
- def _sync_vlm_vision_task(messages: List) -> str:
146
+ def vlm_vision_task_tool(messages: List) -> str:
147
147
  """Synchronous VLM vision task wrapper."""
148
148
  from media_agent_mcp.ai_models.seed16 import process_vlm_task
149
149
  return process_vlm_task(messages)
150
150
 
151
151
 
152
152
  @async_wrapper
153
- def _sync_image_selector(image_paths: List[str], prompt: str) -> str:
153
+ def image_selector_tool(image_paths: List[str], prompt: str) -> str:
154
154
  """Synchronous image selector wrapper."""
155
155
  try:
156
156
  result = select_best_image(image_paths, prompt)
@@ -168,7 +168,7 @@ def _sync_image_selector(image_paths: List[str], prompt: str) -> str:
168
168
 
169
169
 
170
170
  @async_wrapper
171
- def _sync_video_selector(video_paths: List[str], prompt: str) -> str:
171
+ def video_selector_tool(video_paths: List[str], prompt: str) -> str:
172
172
  """Synchronous video selector wrapper."""
173
173
  try:
174
174
  result = select_best_video(video_paths, prompt)
@@ -186,7 +186,7 @@ def _sync_video_selector(video_paths: List[str], prompt: str) -> str:
186
186
 
187
187
 
188
188
  @async_wrapper
189
- def _sync_tos_save_content(content: str, file_extension: str = "txt",
189
+ def tos_save_content_tool(content: str, file_extension: str = "txt",
190
190
  object_key: Optional[str] = None) -> str:
191
191
  """Synchronous TOS content save wrapper."""
192
192
  import tempfile
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: media-agent-mcp
3
- Version: 0.3.4
3
+ Version: 0.3.5
4
4
  Summary: A Model Context Protocol server for media processing with AI tools
5
5
  Author-email: Media Agent Team <team@mediaagent.com>
6
6
  Keywords: mcp,ai,media,video,image,processing
@@ -1,6 +1,6 @@
1
1
  media_agent_mcp/__init__.py,sha256=4kV5u8kHrsdjpMHDNUhc8h4U6AwOyw1mNptFPd2snrQ,365
2
- media_agent_mcp/async_server.py,sha256=ZvUKAezbsMTmXTe-SvffoGkn_GLiP9mSqSxGXVEMI0s,9793
3
- media_agent_mcp/async_wrapper.py,sha256=bHi0cCKxv6R9oHcNcNq8tV0AyKrTDV47s8BuWetqlIg,8992
2
+ media_agent_mcp/async_server.py,sha256=600PJ9pkpxSSQPPnw-xFf51O7XYuRn2eRfuxvo2GNsQ,9631
3
+ media_agent_mcp/async_wrapper.py,sha256=pBYtOPrAVavPhWDW4WIE9m5hCmlyoCMiDV8Gv6N7ZeI,8983
4
4
  media_agent_mcp/server.py,sha256=-mTeNcJXIlgByCG2HhaqV6zSbhjrQIEv_ssLN47KAzM,13759
5
5
  media_agent_mcp/ai_models/__init__.py,sha256=WN8JDSJbj2-sNwaQg3MDwmm9mvJTC1mqpWliac3sHoc,427
6
6
  media_agent_mcp/ai_models/seed16.py,sha256=P3KHNF_SfLryJz6qFP7UUtBfw_28ubdrj2lJkt3WsY8,4989
@@ -14,8 +14,8 @@ media_agent_mcp/storage/__init__.py,sha256=eio7ZiSeLjCxICSZwZisiR7wKJfXlT2PV7aDE
14
14
  media_agent_mcp/storage/tos_client.py,sha256=9c3GPmQe2stvxgZzsWYjVqKzVyvluZqYneCXYj-FQ3M,3174
15
15
  media_agent_mcp/video/__init__.py,sha256=4ILnqYaUaYKI4GWOSg2SNZqt10UM1Y-8Q2SVvjoijqY,277
16
16
  media_agent_mcp/video/processor.py,sha256=5ABPyj1IoD2xyIiB8dkEx4ZssPTXKHtuoFjy-dmnFks,11866
17
- media_agent_mcp-0.3.4.dist-info/METADATA,sha256=jgvdLlrqaELoPb23mLBycd5l9876vp-atRUtkrZKbp4,10975
18
- media_agent_mcp-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- media_agent_mcp-0.3.4.dist-info/entry_points.txt,sha256=qhOUwR-ORVf9GO7emhhl7Lgd6MISgqbZr8bEuSH_VdA,70
20
- media_agent_mcp-0.3.4.dist-info/top_level.txt,sha256=WEa0YfchpTxZgiKn8gdxYgs-dir5HepJaTOrxAGx9nY,16
21
- media_agent_mcp-0.3.4.dist-info/RECORD,,
17
+ media_agent_mcp-0.3.5.dist-info/METADATA,sha256=F0tsG5aIwLkGV9B5j0-On8F5yBtb4GAbu0I2BkiP-cw,10975
18
+ media_agent_mcp-0.3.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
+ media_agent_mcp-0.3.5.dist-info/entry_points.txt,sha256=qhOUwR-ORVf9GO7emhhl7Lgd6MISgqbZr8bEuSH_VdA,70
20
+ media_agent_mcp-0.3.5.dist-info/top_level.txt,sha256=WEa0YfchpTxZgiKn8gdxYgs-dir5HepJaTOrxAGx9nY,16
21
+ media_agent_mcp-0.3.5.dist-info/RECORD,,