Skip to main content
Glama

fetch_emails

Fetches unread emails from Gmail as a JSON array to enable classification, summarization, and task extraction for inbox triage.

Instructions

Fetch unread emails (JSON list). Use mock=True for the fixture demo.

Returns a JSON array of {id, sender, subject, body, thread_id, received}. Reason over these yourself: classify each, summarize long ones, extract tasks and draft replies for action_needed items, then call the IO tools.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mockNo
sinceNo24h

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the output format ('JSON array of {id, sender, ...}') and implies a read-only operation ('fetch'). It also instructs the agent to process the emails, adding behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is four sentences and reasonably concise, but contains extraneous workflow instructions ('Reason over these yourself...') that could be omitted or placed elsewhere. It is front-loaded but includes instructions better suited for a prompt.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 optional parameters) and the presence of an output schema, the description captures the main purpose and return format. However, missing explanation for the 'since' parameter and lack of error handling details reduce completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%. The description only mentions the 'mock' parameter ('Use mock=True for the fixture demo'), but does not explain the 'since' parameter, which has a default of '24h'. The agent is left to infer its purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Fetch unread emails (JSON list)', using a specific verb and resource. This distinguishes it from sibling tools like append_tasks, save_gmail_draft, and write_report, which perform different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a concrete usage scenario ('Use mock=True for the fixture demo') and implies a workflow ('then call the IO tools'). However, it does not explicitly state when not to use this tool or compare it to alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tarunlnmiit/inbox-to-action'

If you have feedback or need assistance with the MCP directory API, please join our Discord server