Mailgent for Gemini
Expose Mailgent to Gemini as function-calling tools. Your Gemini agent gets a real inbox and identity to send mail, hold secrets, clear 2FA, and pay.
Gemini supports function calling, which is all Mailgent needs. Declare each capability as a function the model can invoke, and route the calls to the Mailgent API with the agent's scoped key.
That gives a Gemini-powered agent a real address and the surrounding identity, so it can act on the world rather than only describe what to do.
Declare function tools
Provide Gemini with function declarations for the Mailgent actions you want to allow. When the model returns a function call, execute it against the API and feed the result back.
Scope the key so the model can only trigger permitted actions.
tools = [{
"function_declarations": [{
"name": "mail_send",
"description": "Send email from the agent's inbox",
"parameters": { "type": "object", "properties": {
"to": {"type": "string"}, "subject": {"type": "string"},
"text": {"type": "string"} } }
}]
}]Safe by scope
Even when Gemini chooses to call a tool, the agent's scoped key bounds what actually happens. Every action is attributable to the agent's identity.
FAQ
Which Gemini models work?
Any Gemini model that supports function calling can drive Mailgent tools.
Can it read inbound email?
Yes, with mail scope. Declare a tool that lists and reads threads and feed results back to the model.
Give your agent an inbox.
A real email address, a vault, 2FA, and an identity in one API call.