Copied to Clipboard
We have Lift Off!
Finally- the tools are now available for working with the Nano Banana2 Lite models:
> summarize the mcp tools
The nb2lite-agent Model Context Protocol (MCP) server exposes four tools designed to work with the stateful
Interactions API using the gemini-3.1-flash-lite-image model.
### 🧰 MCP Tool Summary
Tool Name | Action / Purpose | Key Inputs | Outputs | Primary Use Case
--------------------|----------------------|-----------------------|-----------------------|-----------------------
generate_image | Generates a new | prompt , | Path to generated | Creating the initial
| image from scratch | aspect_ratio | image file, | baseline
| using a text prompt. | (default: '1:1' ), | interaction_id | image/concept.
| | thinking_level | |
| | (default: 'medium' ) | |
edit_image | Modifies a | previous_interaction_| Path to modified | Stateful, multi-turn
| previously generated | id , edit_prompt , | image file, new | refinement (e.g.,
| image while | thinking_level | interaction_id | adding objects,
| preserving context, | (default: 'medium' ) | | changing clothes,
| style, and pixel | | | adjusting lighting).
| continuity. | | |
edit_local_image | Uploads a local | image_path , | Path to edited image | Modifying custom
| image (Base64 | edit_prompt , | file, interaction_id | local assets or
| inline) and applies | aspect_ratio , | | sketches (e.g.,
| natural language | thinking_level | | turning a sketch into
| edits to it. | (default: 'medium' ) | | a 3D render).
get_help | Retrieves current | None | Help message string | Troubleshooting
| configuration state | | detailing variables | configuration or
| and tool list. | | and schemas | double-checking
| | | | available options.
### 💡 Core Design Features
• Stateful Continuity: Tools that generate or edit images automatically enable store=True under the hood. Using
the returned interaction_id from a previous call allows seamless, iterative edits on Google's servers.
• Thinking Budgets: The thinking_level parameter ( minimal , low , medium , high ) allows trade-offs between
generation speed (latency) and the detail/correctness of complex compositions.
• Thread-Safe Savings: Images are written to IMAGE_OUTPUT_DIR (currently /home/xbill/nb2lite ) using collision-
resistant unique names ( gen_<timestamp>_<uuid>.png ).
Enough, Already! Show me the Money!
Antigravity CLI was started up for a hands-on image editing session:
Please wait while the banner image is being generated using the Gemini Interactions API. I will update you once it
is ready.
I have generated the banner image for your article "Nano Banana 2 Lite with MCP and Antigravity CLI" using the
Gemini Interactions API.
Here are the details of the generated image:
• Saved Image: gen_1782839885_f1ecaeae.jpg
• Interaction ID: v1_ChdTX3BEYXE2TE9jeWgxTWtQMjdxU3FBNBIXU19wRGFxNkxPY3loMU1rUDI3cVNxQTQ
Not a fan of Bananas?
> edit image • Saved Image: gen_1782839885_f1ecaeae.jpg
• Interaction ID: v1_ChdTX3BEYXE2TE9jeWgxTWtQMjdxU3FBNBIXU19wRGFxNkxPY3loMU1rUDI3cVNxQTQ
change the bananna to an apple!
Not a fan of Apples?
> modify @[edit_1782840940_1737e465.jpg] to change the apple to a pinapple
I will inspect the schema for the edit_local_image tool to ensure correct arguments are passed.
●くろまる Read(/home/xbill/.gemini/antigravity-cli/mcp/nb2lite-agent/edit_local_image.json) (ctrl+o to expand)
I will call the edit_local_image tool to upload the local image and request the modification to change the apple
to a pineapple.
●くろまる nb2lite-agent/edit_local_image(Edit local image) (ctrl+o to expand)
I will retry editing the image, specifying a supported thinking level ( high ), as medium is not supported by the
model.
●くろまる nb2lite-agent/edit_local_image(Edit local image) (ctrl+o to expand)
I have successfully modified the image to replace the apple with a pineapple.
• Original Image: edit_1782840940_1737e465.jpg
• Modified Image: edit_local_1782841200_b6351285.jpg
• Interaction ID: v1_ChdidjlEYXBXWUpOYkktOFlQNkpHZWdRTRIXYnY5RGFwV1lKTmJJLThZUDZKR2VnUU0
One last example - the banner for this article was re-themed in steam-punk style:
> use the MCP tool to edit_local_image and retheme @[nano_banana_mcp.jpg] as steam-punk
Please wait while the image is being rethemed using the Gemini Interactions API. I will update you once it is
completed.
I have successfully rethemed the image nano_banana_mcp.jpg to a steam-punk style using the Gemini Interactions API.
Here are the details of the generated image:
• Saved Image: edit_local_1782839741_1c2c5bd5.jpg
• Interaction ID: v1_Chd1X2xEYW8yX01haVVfdU1QMXNXVXNBNBIXdV9sRGFvMl9NYWlVX3VNUDFzV1VzQTQ
One last thought- Where are Agents?
Where are the Agents?
The Antigravity CLI harness itself uses agents to manage the workflow.
The additional touch point for leveraging the MCP interface is that they all are exposed as MCP tools. The MCP tools can be called directly from Agent code or used as a template for Interactions API calls embedded in an Agent.
Summary
The strategy for using MCP with Nano Banana 2 Lite and Antigravity CLI was validated with a incremental step by step approach.
A minimal stdio transport MCP Server was started from Python source code and validated with Antigravity CLI running as a MCP client in the same local environment.
This MCP Python server provided all of the management tools to interact with the model and generate high quality cyberpunk pineapple images.