feat(messaging): add filter param to get_inbox#387
Conversation
Add a `filter` parameter to `get_inbox` that supports filtering conversations by unread, jobs, connections, inmail, or starred. Clicks LinkedIn's inbox filter pill buttons using accessible role-based selectors instead of DOM class names.
Greptile SummaryThis PR adds inbox category filtering to the messaging inbox tool. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (10): Last reviewed commit: "Merge branch 'main' into feature/inbox-f..." | Re-trigger Greptile |
When the inbox filter button click fails, the result now includes a section_errors entry so callers can detect that results may be unfiltered.
|
@stickerdaniel can u PTAL!! |
|
Hey @stickerdaniel bumping this up |
|
@stickerdaniel noticed there was a merge conflict have resolved it PTAL! |
|
Hey, thanks for the PR! A few things before this can go in:
The filter labels are English only, which breaks on non-English LinkedIn sessions (e.g. on a German account "Unread" is "Ungelesen", the button lookup misses, and the caller silently gets back unfiltered results). The scraping rules in CLAUDE.md are pretty strict about locale-independence. Could you either widen Also |
9bb5c28 to
e3b9425
Compare
# Conflicts: # linkedin_mcp_server/scraping/extractor.py
…imit - Rename get_inbox `filter` param to `inbox_filter` to stop shadowing the Python builtin - Document that `_INBOX_FILTER_LABELS` is English-only; non-English sessions surface a `filter_failed` entry in `section_errors`
|
Hey @stickerdaniel, Thanks for spotting the .md file |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Replace the 1s wall-clock pause after clicking an inbox filter pill with a wait on the pill's `aria-pressed="true"` state. The fixed delay could return unfiltered results on slow renders without flipping `filter_failed`, defeating the safety net. Locator intersection routes timeouts into the existing fail path.
Summary
filterparameter toget_inboxsupportingunread,jobs,connections,inmail, andstarredcategoriesget_by_role("button", name=...)selectors instead of DOM class names, following repo scraping rules"none"(all conversations) for backward compatibilityChanges
linkedin_mcp_server/tools/messaging.py: Replaceunread_only: boolwithfilter: Literal["none", "unread", "jobs", "connections", "inmail", "starred"], update docstring to list options for calling agentslinkedin_mcp_server/scraping/extractor.py: Add_INBOX_FILTER_LABELSmap translating param values to LinkedIn button text, click the matching pill after page loadtests/test_tools.py: Parametrized test covering all 5 filter values plus default"none"caseSynthetic prompt
Generated with Claude Opus 4.6
Test plan
uv run pytest tests/test_tools.py::TestMessagingTools— 11 tests passuv run ruff check— no lint issuesget_inbox(unread_only=true)against real LinkedIn session — returned only unread conversationsjobs,connections,inmail,starred) against real LinkedIn session