teamtailor_get_candidate
Retrieve a candidate's details from Teamtailor by ID. Access specific candidate information for recruitment processes.
Instructions
Get a single candidate by their id.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| candidateId | Yes |
Implementation Reference
- src/server.ts:46-63 (handler)Tool handler for teamtailor_get_candidate - receives candidateId, calls client.getCandidate, returns JSON response.
server.tool( "teamtailor_get_candidate", "Get a single candidate by their id.", { candidateId: z.number(), }, async ({ candidateId }) => { const candidate = await client.getCandidate(candidateId); return { content: [ { type: "text", text: JSON.stringify(candidate), } ] } } - src/server.ts:49-51 (schema)Zod schema for input validation - requires candidateId as a number.
{ candidateId: z.number(), }, - src/server.ts:46-64 (registration)Tool registration using server.tool() with name 'teamtailor_get_candidate'.
server.tool( "teamtailor_get_candidate", "Get a single candidate by their id.", { candidateId: z.number(), }, async ({ candidateId }) => { const candidate = await client.getCandidate(candidateId); return { content: [ { type: "text", text: JSON.stringify(candidate), } ] } } ); - src/teamtailor.ts:97-104 (helper)getCandidate method in TeamtailorClient - makes GET request to /candidates/{id} and returns the candidate data.
async getCandidate( id: number, ): Promise<Candidate> { const url = new URL(`${this.baseUrl}/candidates/${id}`); const body = await this.request<{ data: Candidate }>(url); return body.data; }