Skip to content

[FEATURE] Add get_saved_jobs tool to fetch authenticated user's saved job postings #522

Description

@alfonzeta

Feature Description

Add a new read-only MCP tool get_saved_jobs that navigates to the authenticated user's LinkedIn saved jobs page (/my-items/saved-jobs/) and returns the list of saved job postings as raw text plus extracted job IDs.

The tool should follow the same return format as existing scraping tools:
{url, sections: {saved_jobs: raw_text}, job_ids: [...], references?: {...}}

Returned job_ids should be compatible with the existing get_job_details tool so callers can fetch full descriptions in a second step.

Use Case

I built a CV-to-job-offer matching adapter. Today I have to manually copy job descriptions from LinkedIn for each offer I want to evaluate against a CV.

With a saved-jobs tool, my workflow becomes:

  1. Browse LinkedIn and save interesting jobs to Saved (native LinkedIn action).
  2. Call get_saved_jobs to list saved postings and collect job IDs automatically.
  3. Call get_job_details for each ID to pull full descriptions.
  4. Feed those descriptions into the CV matching pipeline without manual copy-paste.

This turns LinkedIn's Saved list into a personal job queue that external tools can consume programmatically.

Suggested Approach

Implement as a new tool in tools/job.py, backed by a LinkedInExtractor method (e.g. get_saved_jobs).

  1. Navigate to https://www.linkedin.com/my-items/saved-jobs/ using the existing authenticated browser session.
  2. Extract innerText from main (same philosophy as search_jobs — minimize DOM dependence).
  3. Reuse _extract_job_ids() to collect numeric IDs from a[href*="/jobs/view/"] links.
  4. Support pagination via max_pages (1–10, default 3), reusing the search_jobs pagination pattern (scroll sidebar, stop when no new IDs).
  5. Return {url, sections: {saved_jobs: text}, job_ids: [...]} plus optional references.

Constraints per project scraping rules:

  • Locale-independent: rely on URL patterns and href extraction, not UI text like "Unsave" or "Saved".
  • One navigation per tool call (single section = single page target).
  • Verify end-to-end against live LinkedIn with uv run before merging.

Out of scope for v1 (can be follow-up issues):

  • Saved vs Archived tab filtering
  • Mutations (unsave, apply, change stage)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions