position_search
Search active positions by name to find relevant job openings in the Evaluar recruitment platform, returning top 10 matches sorted by creation date.
Instructions
Search for positions by name. Returns top 10 matching active positions sorted by creation date.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query for position name (e.g., 'asesor ventas', 'developer') |
Implementation Reference
- src/tools/position.ts:19-49 (handler)The handlePositionSearch function implements the logic for the position_search tool by calling searchPositions and formatting the result.
export async function handlePositionSearch(args: { query: string }): Promise<string> { if (!isAuthenticated()) { return JSON.stringify({ success: false, error: "Not authenticated. Please login first using auth_login.", }); } try { const positions = await searchPositions(args.query); return JSON.stringify({ success: true, positions: positions.map(p => ({ id: p.id, name: p.name, agencyId: p.agencyId, departmentId: p.departmentId, status: p.status, })), count: positions.length, note: positions.length === 0 ? "No positions found. Try a different search term." : "Use the position id, agencyId, and departmentId when creating a process.", }); } catch (error) { return JSON.stringify({ success: false, error: error instanceof Error ? error.message : "Unknown error", }); } } - src/tools/position.ts:4-17 (registration)The definition of the position_search tool, including its name, description, and input schema.
export const positionSearchTool = { name: "position_search", description: "Search for positions by name. Returns top 10 matching active positions sorted by creation date.", inputSchema: { type: "object" as const, properties: { query: { type: "string", description: "Search query for position name (e.g., 'asesor ventas', 'developer')", }, }, required: ["query"], }, };