search_jobs
Find job postings by filtering titles, locations, companies, skills, salary, remote options, experience levels, and posting dates.
Instructions
Search for jobs with filters like titles, locations, companies, skills, salary, and remote options. Returns a list of matching job postings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| titles | No | Job titles to search for (e.g., ["Software Engineer", "Senior Developer"]) | |
| locations | No | Locations to search in (e.g., ["San Francisco", "New York", "Remote"]) | |
| countries | No | Country codes to filter (e.g., ["US", "CA", "UK"]) | |
| companies | No | Specific companies to search (e.g., ["Google", "Meta", "Apple"]) | |
| excludedCompanies | No | Companies to exclude from results | |
| skills | No | Required skills (e.g., ["Python", "React", "AWS"]) | |
| remote | No | Filter for remote jobs only | |
| baseSalaryMin | No | Minimum base salary (USD) | |
| baseSalaryMax | No | Maximum base salary (USD) | |
| expLevels | No | Experience levels (e.g., ["SE" for Senior, "MI" for Mid-level, "EN" for Entry]) | |
| dateOffset | No | Only show jobs posted within this time period (e.g., "2D" for last 2 days) | |
| industries | No | Filter by company industries (use get_industries to see valid values) | |
| companySize | No | Filter by company size (e.g., ["xs" for 1-50, "s" for 50-200, "m" for 200-1K, "l" for 1K-5K, "xl" for 5K+]) | |
| h1bSponsorship | No | Filter for jobs offering H1B sponsorship | |
| limit | No | Maximum number of results (default: 5, max: 50). Keep low to avoid large responses. | |
| page | No | Page number for pagination (default: 1) |
Implementation Reference
- src/tools/jobs.ts:27-51 (handler)Handler for the 'search_jobs' MCP tool. It maps incoming arguments to filters, calls the client's searchJobs method, and returns formatted results.
async (args) => { const filters: Record<string, unknown> = {}; if (args.titles) { filters.titles = args.titles; } if (args.locations) { filters.locations = args.locations; } if (args.countries) { filters.countries = args.countries; } if (args.companies) { filters.companies = args.companies; } if (args.excludedCompanies) { filters.excludedCompanies = args.excludedCompanies; } if (args.skills) { filters.skills = args.skills; } if (args.remote !== undefined) { filters.remote = args.remote; } if (args.baseSalaryMin) { filters.baseSalaryMin = args.baseSalaryMin; } if (args.baseSalaryMax) { filters.baseSalaryMax = args.baseSalaryMax; } if (args.expLevels) { filters.expLevels = args.expLevels; } if (args.dateOffset) { filters.dateOffset = args.dateOffset; } if (args.industries) { filters.industries = args.industries; } if (args.companySize) { filters.companySize = args.companySize; } if (args.h1bSponsorship !== undefined) { filters.h1bSponsorship = args.h1bSponsorship; } const result = await client.searchJobs({ filters, limit: args.limit || 5, page: args.page, }); return { content: [{ type: 'text' as const, text: JSON.stringify({ count: result.count, jobs: result.jobs.map(formatJob) }, null, 2) }] }; } - src/tools/jobs.ts:9-26 (schema)Zod input schema for 'search_jobs' tool, defining all filterable job parameters.
{ titles: z.array(z.string()).optional().describe('Job titles to search for (e.g., ["Software Engineer", "Senior Developer"])'), locations: z.array(z.string()).optional().describe('Locations to search in (e.g., ["San Francisco", "New York", "Remote"])'), countries: z.array(z.string()).optional().describe('Country codes to filter (e.g., ["US", "CA", "UK"])'), companies: z.array(z.string()).optional().describe('Specific companies to search (e.g., ["Google", "Meta", "Apple"])'), excludedCompanies: z.array(z.string()).optional().describe('Companies to exclude from results'), skills: z.array(z.string()).optional().describe('Required skills (e.g., ["Python", "React", "AWS"])'), remote: z.boolean().optional().describe('Filter for remote jobs only'), baseSalaryMin: z.number().optional().describe('Minimum base salary (USD)'), baseSalaryMax: z.number().optional().describe('Maximum base salary (USD)'), expLevels: z.array(z.string()).optional().describe('Experience levels (e.g., ["SE" for Senior, "MI" for Mid-level, "EN" for Entry])'), dateOffset: z.enum(['24H', '1D', '2D', '7D', '14D', '1M', '3M', '6M', '9M', '1Y']).optional().describe('Only show jobs posted within this time period (e.g., "2D" for last 2 days)'), industries: z.array(z.string()).optional().describe('Filter by company industries (use get_industries to see valid values)'), companySize: z.array(z.string()).optional().describe('Filter by company size (e.g., ["xs" for 1-50, "s" for 50-200, "m" for 200-1K, "l" for 1K-5K, "xl" for 5K+])'), h1bSponsorship: z.boolean().optional().describe('Filter for jobs offering H1B sponsorship'), limit: z.number().optional().describe('Maximum number of results (default: 5, max: 50). Keep low to avoid large responses.'), page: z.number().optional().describe('Page number for pagination (default: 1)'), }, - src/tools/jobs.ts:6-52 (registration)Registration of 'search_jobs' tool within the McpServer.
server.tool( 'search_jobs', 'Search for jobs with filters like titles, locations, companies, skills, salary, and remote options. Returns a list of matching job postings.', { titles: z.array(z.string()).optional().describe('Job titles to search for (e.g., ["Software Engineer", "Senior Developer"])'), locations: z.array(z.string()).optional().describe('Locations to search in (e.g., ["San Francisco", "New York", "Remote"])'), countries: z.array(z.string()).optional().describe('Country codes to filter (e.g., ["US", "CA", "UK"])'), companies: z.array(z.string()).optional().describe('Specific companies to search (e.g., ["Google", "Meta", "Apple"])'), excludedCompanies: z.array(z.string()).optional().describe('Companies to exclude from results'), skills: z.array(z.string()).optional().describe('Required skills (e.g., ["Python", "React", "AWS"])'), remote: z.boolean().optional().describe('Filter for remote jobs only'), baseSalaryMin: z.number().optional().describe('Minimum base salary (USD)'), baseSalaryMax: z.number().optional().describe('Maximum base salary (USD)'), expLevels: z.array(z.string()).optional().describe('Experience levels (e.g., ["SE" for Senior, "MI" for Mid-level, "EN" for Entry])'), dateOffset: z.enum(['24H', '1D', '2D', '7D', '14D', '1M', '3M', '6M', '9M', '1Y']).optional().describe('Only show jobs posted within this time period (e.g., "2D" for last 2 days)'), industries: z.array(z.string()).optional().describe('Filter by company industries (use get_industries to see valid values)'), companySize: z.array(z.string()).optional().describe('Filter by company size (e.g., ["xs" for 1-50, "s" for 50-200, "m" for 200-1K, "l" for 1K-5K, "xl" for 5K+])'), h1bSponsorship: z.boolean().optional().describe('Filter for jobs offering H1B sponsorship'), limit: z.number().optional().describe('Maximum number of results (default: 5, max: 50). Keep low to avoid large responses.'), page: z.number().optional().describe('Page number for pagination (default: 1)'), }, async (args) => { const filters: Record<string, unknown> = {}; if (args.titles) { filters.titles = args.titles; } if (args.locations) { filters.locations = args.locations; } if (args.countries) { filters.countries = args.countries; } if (args.companies) { filters.companies = args.companies; } if (args.excludedCompanies) { filters.excludedCompanies = args.excludedCompanies; } if (args.skills) { filters.skills = args.skills; } if (args.remote !== undefined) { filters.remote = args.remote; } if (args.baseSalaryMin) { filters.baseSalaryMin = args.baseSalaryMin; } if (args.baseSalaryMax) { filters.baseSalaryMax = args.baseSalaryMax; } if (args.expLevels) { filters.expLevels = args.expLevels; } if (args.dateOffset) { filters.dateOffset = args.dateOffset; } if (args.industries) { filters.industries = args.industries; } if (args.companySize) { filters.companySize = args.companySize; } if (args.h1bSponsorship !== undefined) { filters.h1bSponsorship = args.h1bSponsorship; } const result = await client.searchJobs({ filters, limit: args.limit || 5, page: args.page, }); return { content: [{ type: 'text' as const, text: JSON.stringify({ count: result.count, jobs: result.jobs.map(formatJob) }, null, 2) }] }; } );