Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@linkedapi/mcp",
"version": "2.3.7",
"version": "2.3.8",
"description": "MCP server that lets AI assistants control LinkedIn accounts and retrieve real-time data.",
"main": "dist/index.js",
"bin": {
Expand Down Expand Up @@ -30,7 +30,7 @@
"author": "Linked API",
"license": "MIT",
"dependencies": {
"@linkedapi/node": "^2.3.9",
"@linkedapi/node": "^2.3.10",
"@modelcontextprotocol/sdk": "^1.17.4",
"zod": "^4.1.1"
},
Expand Down
2 changes: 1 addition & 1 deletion src/tools/fetch-job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export class FetchJobTool extends OperationTool<TBaseFetchJobParams, unknown> {
return {
name: this.name,
description:
'Open a LinkedIn job and retrieve its details such as company, location, salary, and description (st.openJob action). The result carries urn — the permanent LinkedIn job posting URN (urn:li:jobPosting:<jobId>) — and companyUrn for the hiring company (urn:li:organization:<id>); either is null when LinkedIn does not expose the identifier.',
'Open a LinkedIn job and retrieve its details such as company, location, salary, and description (st.openJob action). The result carries urn — the permanent LinkedIn job posting URN (urn:li:jobPosting:<jobId>) — which is null when LinkedIn does not expose the identifier.',
inputSchema: {
type: 'object',
properties: {
Expand Down
94 changes: 90 additions & 4 deletions src/tools/search-jobs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export class SearchJobsTool extends OperationTool<TSearchJobsParams, unknown> {
protected override readonly schema = z.object({
term: z.string().optional(),
limit: z.number().min(1).max(1000).optional(),
location: z.string().optional(),
allowSimilarResults: z.boolean().optional(),
filter: z
.object({
location: z.string().optional(),
Expand Down Expand Up @@ -50,14 +52,31 @@ export class SearchJobsTool extends OperationTool<TSearchJobsParams, unknown> {
fairChanceEmployer: z.boolean().optional(),
})
.optional(),
preferences: z
.object({
datePosted: z.enum(['anyTime', 'past24Hours', 'pastWeek', 'pastMonth']).optional(),
experienceLevels: z
.array(z.enum(['entryLevel', 'senior', 'manager', 'director', 'executive']))
.optional(),
employmentTypes: z
.array(z.enum(['fullTime', 'partTime', 'contract', 'internship', 'volunteer']))
.optional(),
companies: z.array(z.string()).optional(),
remote: z.boolean().optional(),
easyApply: z.boolean().optional(),
under10Applicants: z.boolean().optional(),
inYourNetwork: z.boolean().optional(),
keywords: z.array(z.string()).optional(),
})
.optional(),
customSearchUrl: z.string().optional(),
});

public override getTool(): Tool {
return {
name: this.name,
description:
'Allows you to search jobs applying various filtering criteria (st.searchJobs action). Every job in the result carries urn — its permanent LinkedIn job posting URN (urn:li:jobPosting:<jobId>), or null when the job id could not be extracted.',
'Allows you to search jobs applying various filtering criteria (st.searchJobs action). LinkedIn serves either a classic or an AI-powered jobs search, and the two do not offer the same refinements: send filter for the classic one or preferences for the AI-powered one, never both. Every job in the result carries urn — its permanent LinkedIn job posting URN (urn:li:jobPosting:<jobId>), or null when the job id could not be extracted — and isSimilarMatch, telling whether LinkedIn returned it as a near match rather than an exact one.',
inputSchema: {
type: 'object',
properties: {
Expand All @@ -70,14 +89,24 @@ export class SearchJobsTool extends OperationTool<TSearchJobsParams, unknown> {
description:
'Optional. Number of search results to return. Defaults to 10, with a maximum value of 1000.',
},
location: {
type: 'string',
description:
'Optional. Free-form location string. Applied on both versions of LinkedIn jobs search.',
},
allowSimilarResults: {
type: 'boolean',
description:
'Optional. Defaults to true. When false, near matches are excluded from the results, so fewer results than limit may be returned. Only relevant to the AI-powered search.',
},
filter: {
type: 'object',
description:
'Optional. Object that specifies filtering criteria for jobs. When multiple filter fields are specified, they are combined using AND logic.',
'Optional. Filtering criteria for the classic LinkedIn jobs search. Every specified field is applied, or the action fails. When multiple filter fields are specified, they are combined using AND logic. Mutually exclusive with preferences.',
properties: {
location: {
type: 'string',
description: 'Optional. Free-form location string.',
description: 'Optional. Deprecated, use the top-level location instead.',
},
datePosted: {
type: 'string',
Expand Down Expand Up @@ -160,10 +189,67 @@ export class SearchJobsTool extends OperationTool<TSearchJobsParams, unknown> {
},
},
},
preferences: {
type: 'object',
description:
"Optional. Filtering criteria for the AI-powered LinkedIn jobs search. LinkedIn decides which of them it offers for a given search, and the ones it does not offer are skipped instead of failing the action. Mutually exclusive with filter. When the account's version of LinkedIn jobs search cannot apply the criteria that were sent, the action fails with searchInterfaceMismatch.",
properties: {
datePosted: {
type: 'string',
enum: ['anyTime', 'past24Hours', 'pastWeek', 'pastMonth'],
description: 'Optional. How recently the job was posted.',
},
experienceLevels: {
type: 'array',
description:
'Optional. Array of experience levels, where senior corresponds to midSeniorLevel in filter.',
items: {
type: 'string',
enum: ['entryLevel', 'senior', 'manager', 'director', 'executive'],
},
},
employmentTypes: {
type: 'array',
description: 'Optional. Array of employment types.',
items: {
type: 'string',
enum: ['fullTime', 'partTime', 'contract', 'internship', 'volunteer'],
},
},
companies: {
type: 'array',
description: 'Optional. Array of company names.',
items: { type: 'string' },
},
remote: {
type: 'boolean',
description:
'Optional. When true, only remote jobs. The AI-powered search has no on-site or hybrid equivalent.',
},
easyApply: {
type: 'boolean',
description: 'Optional. When true, only jobs with Easy Apply.',
},
under10Applicants: {
type: 'boolean',
description: 'Optional. When true, only jobs with fewer than 10 applicants.',
},
inYourNetwork: {
type: 'boolean',
description: 'Optional. When true, only jobs from your network.',
},
keywords: {
type: 'array',
description:
'Optional. Array of free-form skills, technologies or topics to narrow the search by, such as AWS or Fintech. LinkedIn suggests a different set for every search.',
items: { type: 'string' },
},
},
},
customSearchUrl: {
type: 'string',
description:
'Optional. URL copied from a LinkedIn jobs search page. When specified, overrides term and filter.',
'Optional. URL copied from a LinkedIn jobs search page. When specified, overrides term, location, filter and preferences.',
},
},
},
Expand Down