Problem
get_attachment changes behavior based on whether filename is provided:
- With filename: extracts and saves an attachment to disk
- Without filename: extracts hyperlinks from the email HTML
This dual behavior is confusing for LLMs — the tool name suggests attachment extraction, but it secretly does link extraction too.
Proposed Solution
Split into two distinct tools:
get_attachment(message_id, filename) — extract and save attachment
get_email_links(message_id) — extract hyperlinks from email HTML
Keep get_attachment with filename as optional for backwards compatibility during transition.
Source
Identified via Gemini code review (v0.1.8 development cycle).
Problem
get_attachmentchanges behavior based on whetherfilenameis provided:This dual behavior is confusing for LLMs — the tool name suggests attachment extraction, but it secretly does link extraction too.
Proposed Solution
Split into two distinct tools:
get_attachment(message_id, filename)— extract and save attachmentget_email_links(message_id)— extract hyperlinks from email HTMLKeep
get_attachmentwithfilenameas optional for backwards compatibility during transition.Source
Identified via Gemini code review (v0.1.8 development cycle).