Skip to content

Commit 131a14b

Browse files
docs(saved-jobs): add docs, expose max_pages, use Set in JS dedup
Address Greptile review: use Set for O(1) dedup in _EXTRACT_JOB_IDS_JS, expose max_pages parameter on get_saved_jobs MCP tool, and document the new tool in AGENTS.md, README.md, and docs/docker-hub.md. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 20d5463 commit 131a14b

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ What has Anthropic been posting about recently? https://www.linkedin.com/company
5252
| `search_jobs` | Search for jobs with keywords and location filters | working |
5353
| `search_people` | Search for people by keywords and location | working |
5454
| `get_job_details` | Get detailed information about a specific job posting | working |
55+
| `get_saved_jobs` | Get saved/bookmarked jobs from your LinkedIn job tracker | working |
5556
| `close_session` | Close browser session and clean up resources | working |
5657

5758
> [!IMPORTANT]

docs/docker-hub.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ A Model Context Protocol (MCP) server that connects AI assistants to LinkedIn. A
99
- **Company Profiles**: Extract comprehensive company data
1010
- **Job Details**: Retrieve job posting information
1111
- **Job Search**: Search for jobs with keywords and location filters
12+
- **Saved Jobs**: Get saved/bookmarked jobs from your LinkedIn job tracker
1213
- **People Search**: Search for people by keywords and location
1314
- **Person Posts**: Get recent activity/posts from a person's profile
1415
- **Company Posts**: Get recent posts from a company's LinkedIn feed

linkedin_mcp_server/scraping/extractor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2078,10 +2078,11 @@ async def search_jobs(
20782078
return result
20792079

20802080
_EXTRACT_JOB_IDS_JS = """() => {
2081+
const seen = new Set();
20812082
const ids = [];
20822083
document.querySelectorAll('a[href*="/jobs/view/"]').forEach(a => {
20832084
const match = a.href.match(/\\/jobs\\/view\\/(\\d+)/);
2084-
if (match && !ids.includes(match[1])) ids.push(match[1]);
2085+
if (match && !seen.has(match[1])) { seen.add(match[1]); ids.push(match[1]); }
20852086
});
20862087
return ids;
20872088
}"""

0 commit comments

Comments
 (0)