Get Job Opportunities
get_job_opportunitiesRetrieve recently discovered job opportunities from automated monitoring. Filter by resume cluster and limit the number of results.
Instructions
Get recently discovered job opportunities from automated monitoring
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_job_opportunities"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cluster | No | Filter by resume cluster (full-stack-react, frontend-react, nextjs-focused, general-swe) | |
| limit | No | Maximum number of jobs to return |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes |
Implementation Reference
- api/mcp.ts:318-333 (handler)Handler for get_job_opportunities: reads latest.json from GitHub, optionally filters by cluster and limits results, returns JSON string or error message.
async ({ cluster, limit }) => { try { const opportunities = await readJsonFile<JobOpportunitiesData>("job-applications/opportunities/latest.json"); let jobs = opportunities.jobs || []; if (cluster) { jobs = jobs.filter(j => j.cluster === cluster); } if (limit) { jobs = jobs.slice(0, limit); } return { content: [{ type: "text", text: JSON.stringify(jobs, null, 2) }] }; } catch { return { content: [{ type: "text", text: "No job opportunities file found." }] }; } } ); - api/mcp.ts:307-333 (registration)Registration of the get_job_opportunities tool with input schema (cluster, limit) and output schema.
server.registerTool( "get_job_opportunities", { title: "Get Job Opportunities", description: "Get recently discovered job opportunities from automated monitoring", inputSchema: { cluster: z.string().optional().describe("Filter by resume cluster (full-stack-react, frontend-react, nextjs-focused, general-swe)"), limit: z.number().optional().describe("Maximum number of jobs to return"), }, outputSchema: textContentOutputSchema, }, async ({ cluster, limit }) => { try { const opportunities = await readJsonFile<JobOpportunitiesData>("job-applications/opportunities/latest.json"); let jobs = opportunities.jobs || []; if (cluster) { jobs = jobs.filter(j => j.cluster === cluster); } if (limit) { jobs = jobs.slice(0, limit); } return { content: [{ type: "text", text: JSON.stringify(jobs, null, 2) }] }; } catch { return { content: [{ type: "text", text: "No job opportunities file found." }] }; } } ); - src/types.ts:142-157 (schema)Type definitions for JobOpportunity and JobOpportunitiesData used by the tool handler.
export interface JobOpportunity { title: string; company: string; location: string; url: string; cluster?: string; resume?: string; salary_min?: number; salary_max?: number; posted_date?: string; } export interface JobOpportunitiesData { generated_at: string; jobs: JobOpportunity[]; } - api/mcp.ts:40-43 (helper)Helper that fetches JSON from GitHub and parses it. Used by the handler to read job opportunities data.
async function readJsonFile<T>(relativePath: string): Promise<T> { const content = await fetchFromGitHub(relativePath); return JSON.parse(content) as T; } - api/mcp.ts:50-57 (helper)Common output schema for text content, referenced by the tool's outputSchema.
const textContentOutputSchema = z.object({ content: z.array( z.object({ type: z.literal("text"), text: z.string(), }) ), });