ultimate-gemini-mcp 1.0.9__py3-none-any.whl → 1.0.11__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.

Potentially problematic release.


This version of ultimate-gemini-mcp might be problematic. Click here for more details.

src/__init__.py CHANGED
@@ -7,7 +7,7 @@ A unified MCP server that combines the best features from:
7
7
  - Advanced features: batch processing, editing, templates, and more
8
8
  """
9
9
 
10
- __version__ = "1.0.9"
10
+ __version__ = "1.0.11"
11
11
  __author__ = "Ultimate Gemini MCP"
12
12
 
13
13
  from .config import get_settings
@@ -115,6 +115,7 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
115
115
  output_format: str = "png",
116
116
  batch_size: int | None = None,
117
117
  negative_prompt: str | None = None,
118
+ save_to_disk: bool = False,
118
119
  ) -> str:
119
120
  """
120
121
  Generate multiple images from a list of prompts efficiently.
@@ -130,9 +131,10 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
130
131
  output_format: Image format for all images (default: png)
131
132
  batch_size: Parallel batch size (default: from config)
132
133
  negative_prompt: Negative prompt for Imagen models (optional)
134
+ save_to_disk: Save images to output directory (default: False, optimized for cloud)
133
135
 
134
136
  Returns:
135
- JSON string with batch results including individual image paths
137
+ JSON string with batch results including base64 image data and file paths (if saved)
136
138
  """
137
139
  try:
138
140
  result = await batch_generate_images(
@@ -143,6 +145,7 @@ def register_batch_generate_tool(mcp_server: Any) -> None:
143
145
  output_format=output_format,
144
146
  batch_size=batch_size,
145
147
  negative_prompt=negative_prompt,
148
+ save_to_disk=save_to_disk,
146
149
  )
147
150
 
148
151
  return json.dumps(result, indent=2)
@@ -38,7 +38,7 @@ async def generate_image_tool(
38
38
  negative_prompt: str | None = None,
39
39
  seed: int | None = None,
40
40
  # Output options
41
- save_to_disk: bool = True,
41
+ save_to_disk: bool = False,
42
42
  **kwargs: Any,
43
43
  ) -> dict[str, Any]:
44
44
  """
@@ -150,13 +150,20 @@ async def generate_image_tool(
150
150
  "index": result.index,
151
151
  "size": result.get_size(),
152
152
  "timestamp": result.timestamp.isoformat(),
153
+ # Always include base64 data for cloud/HTTP deployments
154
+ "image_base64": result.image_data,
153
155
  }
154
156
 
155
157
  if save_to_disk:
156
- # Save to output directory
157
- file_path = result.save(settings.output_dir)
158
- image_info["path"] = str(file_path)
159
- image_info["filename"] = file_path.name
158
+ # Try to save to output directory, but don't fail if it errors
159
+ try:
160
+ file_path = result.save(settings.output_dir)
161
+ image_info["path"] = str(file_path)
162
+ image_info["filename"] = file_path.name
163
+ logger.info(f"Saved image to {file_path}")
164
+ except Exception as e:
165
+ logger.warning(f"Failed to save image to disk: {e}")
166
+ image_info["save_error"] = str(e)
160
167
 
161
168
  # Add enhanced prompt info
162
169
  if "enhanced_prompt" in result.metadata:
@@ -187,6 +194,7 @@ def register_generate_image_tool(mcp_server: Any) -> None:
187
194
  use_world_knowledge: bool = False,
188
195
  negative_prompt: str | None = None,
189
196
  seed: int | None = None,
197
+ save_to_disk: bool = False,
190
198
  ) -> str:
191
199
  """
192
200
  Generate images using Google's Gemini or Imagen models.
@@ -208,6 +216,7 @@ def register_generate_image_tool(mcp_server: Any) -> None:
208
216
  use_world_knowledge: Use real-world knowledge (Gemini only)
209
217
  negative_prompt: What to avoid in the image (Imagen only)
210
218
  seed: Random seed for reproducibility (NOT SUPPORTED - will be ignored)
219
+ save_to_disk: Save images to output directory (default: False, optimized for cloud)
211
220
 
212
221
  Available models:
213
222
  - gemini-2.5-flash-image (default)
@@ -216,7 +225,7 @@ def register_generate_image_tool(mcp_server: Any) -> None:
216
225
  - imagen-4-ultra
217
226
 
218
227
  Returns:
219
- JSON string with generation results and file paths
228
+ JSON string with generation results, base64 image data, and file paths (if saved)
220
229
  """
221
230
  try:
222
231
  result = await generate_image_tool(
@@ -232,6 +241,7 @@ def register_generate_image_tool(mcp_server: Any) -> None:
232
241
  use_world_knowledge=use_world_knowledge,
233
242
  negative_prompt=negative_prompt,
234
243
  seed=seed,
244
+ save_to_disk=save_to_disk,
235
245
  )
236
246
 
237
247
  return json.dumps(result, indent=2)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ultimate-gemini-mcp
3
- Version: 1.0.9
3
+ Version: 1.0.11
4
4
  Summary: Ultimate image generation MCP server unifying Gemini 2.5 Flash Image and Imagen 4/Fast/Ultra with advanced features
5
5
  Project-URL: Homepage, https://github.com/anand-92/ultimate-image-gen-mcp
6
6
  Project-URL: Repository, https://github.com/anand-92/ultimate-image-gen-mcp
@@ -1,4 +1,4 @@
1
- src/__init__.py,sha256=QDiaoQrxEzRAv6Y4EwlABghXsywxHfU-toNNSq8bo7Y,435
1
+ src/__init__.py,sha256=ZXiPask84hr7qpYjoNmUoxbMUR7EFygK5qxDMaXMmRI,436
2
2
  src/server.py,sha256=nZI63qIDL3JWv3dyyFk6lIXStZuHe1MTdZqZSrqK56k,5862
3
3
  src/config/__init__.py,sha256=hL0recV_ycXBEGCym7BqwyaPCnQHy8o429pBirnBeiA,704
4
4
  src/config/constants.py,sha256=ue4dT6wFwCzAgDWvSt8RnbdaoaGHY8c7SViNxI-P73w,1870
@@ -14,11 +14,11 @@ src/services/image_service.py,sha256=ovYsxDMwqsSiG1YbwBcTBrgmGTA7bdhDF6_jPs9XV_k
14
14
  src/services/imagen_client.py,sha256=mvwbmtYQHqpKKM36tp8JPZTjxav5eeeist37lRJsv4k,6122
15
15
  src/services/prompt_enhancer.py,sha256=J_0s1EVmXdPAhjZPM4hL1vk9YiawqfH_ogF89VrFkW8,4776
16
16
  src/tools/__init__.py,sha256=zBfAjFT51LvvD7WXTfDYiyJstRdphr2ChddAmGMZxkI,346
17
- src/tools/batch_generate.py,sha256=LLrIwVvx-0kZBCiR0tcYnmKi5iYIdV-93ekIQbMrabo,5004
18
- src/tools/generate_image.py,sha256=BGmplbkqaFvLa8mbJWs-a8v1t5i-Pdep4IZhXHIbisk,8456
17
+ src/tools/batch_generate.py,sha256=W-o0zSydMqhNS4cAWJTDPxjRVfbPomUSqyuxsHREf-s,5200
18
+ src/tools/generate_image.py,sha256=hOCVDt_HgYvQ_i3rH2K4X8Z2MYWVF1XQ_DSS_TUjGDI,9084
19
19
  src/utils/__init__.py,sha256=T2UShY0j2kiu63YPOsTACrzOfWTTq4PmC0flzcgeCl0,55
20
- ultimate_gemini_mcp-1.0.9.dist-info/METADATA,sha256=Si2_Mzra49e4A2OG-Z7p-kj350vmV0wEH_BhUymqYtA,16130
21
- ultimate_gemini_mcp-1.0.9.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
- ultimate_gemini_mcp-1.0.9.dist-info/entry_points.txt,sha256=-BeRTT4oR05e-YnF1ZNbNxlaekD4LsWhD-Zy_1dyRnc,56
23
- ultimate_gemini_mcp-1.0.9.dist-info/licenses/LICENSE,sha256=ilyzUnN0QHYtYGJks-NFUwiniNu08IedLmn_muRqa0o,1480
24
- ultimate_gemini_mcp-1.0.9.dist-info/RECORD,,
20
+ ultimate_gemini_mcp-1.0.11.dist-info/METADATA,sha256=Hwb8kpNkWW6M0xgL2kvXwJ8nyE-B9SyCGdwvWetf5r0,16131
21
+ ultimate_gemini_mcp-1.0.11.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
22
+ ultimate_gemini_mcp-1.0.11.dist-info/entry_points.txt,sha256=-BeRTT4oR05e-YnF1ZNbNxlaekD4LsWhD-Zy_1dyRnc,56
23
+ ultimate_gemini_mcp-1.0.11.dist-info/licenses/LICENSE,sha256=ilyzUnN0QHYtYGJks-NFUwiniNu08IedLmn_muRqa0o,1480
24
+ ultimate_gemini_mcp-1.0.11.dist-info/RECORD,,