modus_get_open_positions
Retrieve open job requisitions and hiring forecast by quarter, including status, department, and planned start dates for headcount planning.
Instructions
Get open job requisitions and hiring forecast by quarter. Returns open positions with status, department, and planned start dates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| status | No | Filter by requisition status. Default: OPEN | |
| department | No | Filter by department name |
Implementation Reference
- modus-mcp-server.js:104-122 (schema)Tool definition and input schema for modus_get_open_positions, registered in the TOOLS array with name, description, and inputSchema (status enum, department filter).
{ name: "modus_get_open_positions", description: "Get open job requisitions and hiring forecast by quarter. Returns open positions with status, department, and planned start dates.", inputSchema: { type: "object", properties: { status: { type: "string", enum: ["OPEN", "DRAFT", "CLOSED", "ALL"], description: "Filter by requisition status. Default: OPEN", }, department: { type: "string", description: "Filter by department name", }, }, }, }, - modus-mcp-server.js:563-622 (handler)Handler implementation for modus_get_open_positions in the CallToolRequestSchema switch statement. Fetches from /api/open-headcount, filters by status and department, builds summary stats, and returns formatted response.
case "modus_get_open_positions": { const { status, department } = args || {}; // Fetch all open positions response = await modusApi.get(`/api/open-headcount`); // Extract jobs array from response data const data = response.data || {}; let positions = data.jobs || []; if (status && status !== "ALL") { positions = positions.filter(pos => pos.atsStatus === status); } if (department) { positions = positions.filter(pos => pos.department?.name?.toLowerCase().includes(department.toLowerCase()) ); } // Add summary (using the stats from the API response) const summary = { total: positions.length, hired: data.hired || 0, open: data.open || 0, notOpen: data.notOpen || 0, offerPending: data.offerPending || 0, readyToRecruit: data.readyToRecruit || 0, byStatus: {}, byDepartment: {}, byQuarter: {}, }; positions.forEach((pos) => { if (pos.atsStatus) { summary.byStatus[pos.atsStatus] = (summary.byStatus[pos.atsStatus] || 0) + 1; } if (pos.department?.name) { summary.byDepartment[pos.department.name] = (summary.byDepartment[pos.department.name] || 0) + 1; } if (pos.hiringQuarter?.name) { summary.byQuarter[pos.hiringQuarter.name] = (summary.byQuarter[pos.hiringQuarter.name] || 0) + 1; } }); return { content: [ { type: "text", text: JSON.stringify( { summary, openPositions: positions, }, null, 2 ), }, ], }; } - modus-mcp-server.js:388-392 (registration)ListToolsRequestSchema handler that exposes the TOOLS array (including modus_get_open_positions) to clients via the MCP protocol.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: TOOLS, }; });