get_market_comp
Retrieve market compensation data for a specific role and location to benchmark salary expectations.
Instructions
Get market compensation data for a role and location.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| role | Yes | Job title / role (e.g. 'Senior Software Engineer') | |
| location | Yes | Location (e.g. 'Amsterdam, NL' or 'Remote') | |
| stack | No | Tech stack for more precise data (optional) |
Implementation Reference
- index.js:130-151 (schema)Input schema definition for the 'get_market_comp' tool, defining role (required), location (required), and stack (optional) parameters with descriptions.
{ name: 'get_market_comp', description: 'Get market compensation data for a role and location. Returns median, P25, P75, and P90 salary bands.', inputSchema: { type: 'object', properties: { role: { type: 'string', description: 'Job title or role (e.g. "Senior Software Engineer", "Product Manager")', }, location: { type: 'string', description: 'City, country, or region (e.g. "Amsterdam, Netherlands", "San Francisco, CA")', }, stack: { type: 'string', description: 'Optional tech stack to refine comp data (e.g. "Rust", "Go", "ML/AI")', }, }, required: ['role', 'location'], }, }, - index.js:59-152 (registration)The 'get_market_comp' tool is registered as part of WEEK1_TOOLS array (line 130-151), which is merged with backend tools in handleToolsList and included in NEW_TOOL_NAMES for the tools/list response.
const WEEK1_TOOLS = [ { name: 'search_jobs', description: 'Search for jobs across integrated job boards. Returns ranked listings matching the query and optional filters.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Job title, keywords, or natural-language search (e.g. "senior backend engineer fintech")', }, stack: { type: 'string', description: 'Comma-separated tech stack filter (e.g. "Node.js,TypeScript,PostgreSQL")', }, comp_min: { type: 'number', description: 'Minimum annual compensation in USD', }, comp_max: { type: 'number', description: 'Maximum annual compensation in USD', }, remote: { type: 'boolean', description: 'If true, return only remote-friendly roles', }, limit: { type: 'number', description: 'Max results to return (default: 20, max: 100)', }, }, required: ['query'], }, }, { name: 'get_match_score', description: 'Score how well a candidate\'s profile matches a specific job. Returns a 0–100 score with a breakdown by skills, experience, and education.', inputSchema: { type: 'object', properties: { candidate_id: { type: 'string', description: 'Candidate profile ID (use "me" for the authenticated user)', }, job_id: { type: 'string', description: 'Job listing ID returned by search_jobs or get_recommended_jobs', }, }, required: ['candidate_id', 'job_id'], }, }, { name: 'get_recommended_jobs', description: 'Get AI-recommended jobs ranked by match score for a candidate. Uses profile, skills, and past application history.', inputSchema: { type: 'object', properties: { candidate_id: { type: 'string', description: 'Candidate profile ID (use "me" for the authenticated user)', }, limit: { type: 'number', description: 'Max recommendations to return (default: 10, max: 50)', }, }, required: ['candidate_id'], }, }, { name: 'get_market_comp', description: 'Get market compensation data for a role and location. Returns median, P25, P75, and P90 salary bands.', inputSchema: { type: 'object', properties: { role: { type: 'string', description: 'Job title or role (e.g. "Senior Software Engineer", "Product Manager")', }, location: { type: 'string', description: 'City, country, or region (e.g. "Amsterdam, Netherlands", "San Francisco, CA")', }, stack: { type: 'string', description: 'Optional tech stack to refine comp data (e.g. "Rust", "Go", "ML/AI")', }, }, required: ['role', 'location'], }, }, ]; - index.js:275-305 (handler)The handler function handleToolsCall proxies all tool calls (including 'get_market_comp') to the backend via callBackend(). If the backend is unreachable, it returns a 'not_implemented' stub since this is a new tool.
async function handleToolsCall(id, params) { const toolName = params && params.name; try { const result = await callBackend({ jsonrpc: '2.0', id, method: 'tools/call', params }); send({ ...result, id }); } catch (err) { // If the backend is unreachable and this is a new tool, return a clear stub message if (NEW_TOOL_NAMES.has(toolName)) { send({ jsonrpc: '2.0', id, result: { content: [ { type: 'text', text: JSON.stringify({ status: 'not_implemented', tool: toolName, message: `The '${toolName}' tool is defined in the MCP layer but the backend handler is not yet deployed. Backend error: ${err.message}`, }, null, 2), }, ], isError: false, }, }); } else { send({ jsonrpc: '2.0', id, error: { code: -32000, message: err.message } }); } } } - index.js:238-242 (helper)NEW_TOOL_NAMES set includes 'get_market_comp' so it's recognized as a locally-defined tool. Used to provide a clear stub message when the backend returns an error.
// All new tools that are defined locally (not yet on backend) const NEW_TOOL_NAMES = new Set([ ...WEEK1_TOOLS.map(t => t.name), ...WEEK2_TOOLS.map(t => t.name), ]);