Skip to content

Split get_attachment into separate attachment + links tools #55

@imdinu

Description

@imdinu

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions