Gmail / warm
Search Messages
Search Gmail messages using Gmail query syntax. Returns message ids plus thread ids for targeted reads or follow-up workflows.
Quick Start
aweb inspect gmail.search_messages
aweb add gmail
aweb plan "use Gmail search messages in an agent workflow"import Aweb, { Agent } from '@aweb/sdk';
const aweb = new Aweb({ apiKey: process.env.AWEB_API_KEY });
const agent = new Agent({ tools: aweb.tools });
agent.add('gmail');
const plan = await agent.plan('Use Gmail for this workflow');
const tool = await aweb.tools.inspect('gmail.search_messages');
console.log(plan.nextAction);
console.log(tool.inputSchema);Tool Card
Tool idgmail.search_messages
ProviderGmail (gmail)
Tool namesearch_messages
Activationwarm
Healthhealthy
Trust score1.00
Transportstreamable_http
Latencynot yet measured
Cost0
Requirements and Governance
Authoauth_2_1_pkce
Credentialsetup_required
Workspacerequired
Approvalnone
RiskREAD
Permissionshttps://www.googleapis.com/auth/gmail.readonly, https://www.googleapis.com/auth/gmail.compose, https://www.googleapis.com/auth/gmail.send, read
Credential setup/api/mcp-warehouse/credentials/gmail/init
Schemas
{
"type": "object",
"properties": {
"q": {
"type": "string",
"description": "Gmail search query."
},
"max_results": {
"type": "integer",
"description": "Maximum number of messages to return (default 25, max 100)."
},
"page_token": {
"type": "string",
"description": "Pagination token from a prior search_messages response."
}
},
"required": [
"q"
],
"additionalProperties": false
}Examples
[
{
"objective": "Use Gmail search messages in an agent workflow.",
"args": {
"q": "<q>",
"max_results": "<max_results>",
"page_token": "<page_token>"
}
}
]