- API Client (src/clients/rippling.ts): OAuth2/API key auth, pagination, error handling - 50+ tools across 10 categories: * employees-tools.ts: 7 tools (list, get, create, update, terminate, custom fields, org chart) * companies-tools.ts: 5 tools (company, departments, locations, teams) * payroll-tools.ts: 4 tools (pay runs, pay statements) * time-tools.ts: 11 tools (time entries, timesheets, PTO requests) * benefits-tools.ts: 4 tools (plans, enrollments) * ats-tools.ts: 6 tools (candidates, jobs, applications, pipeline) * learning-tools.ts: 4 tools (courses, assignments) * devices-tools.ts: 4 tools (devices, apps/licenses) * groups-tools.ts: 6 tools (CRUD + members) * custom-objects-tools.ts: 5 tools (CRUD + query) - 16 React UI apps: * employee-dashboard, employee-detail, employee-directory, org-chart * payroll-dashboard, payroll-detail * time-tracker, timesheet-approvals, time-off-calendar * benefits-overview, ats-pipeline, job-board * learning-dashboard, device-inventory, team-overview, department-grid - Full TypeScript types for all API entities - Comprehensive README with usage examples - Production-ready with proper error handling and pagination
127 lines
4.0 KiB
TypeScript
127 lines
4.0 KiB
TypeScript
import { z } from 'zod';
|
|
import type { RipplingClient } from '../clients/rippling.js';
|
|
|
|
export function createATSTools(client: RipplingClient) {
|
|
return {
|
|
rippling_list_candidates: {
|
|
description: 'List all candidates in the ATS',
|
|
inputSchema: z.object({
|
|
jobId: z.string().optional().describe('Filter by job ID'),
|
|
stage: z.string().optional().describe('Filter by current stage'),
|
|
cursor: z.string().optional().describe('Pagination cursor'),
|
|
limit: z.number().min(1).max(500).default(100).optional().describe('Number of results per page'),
|
|
}),
|
|
handler: async (args: any) => {
|
|
const result = await client.listCandidates(args);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
|
|
rippling_get_candidate: {
|
|
description: 'Get detailed candidate information',
|
|
inputSchema: z.object({
|
|
id: z.string().describe('Candidate ID'),
|
|
}),
|
|
handler: async (args: any) => {
|
|
const result = await client.getCandidate(args.id);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
|
|
rippling_list_jobs: {
|
|
description: 'List all job postings',
|
|
inputSchema: z.object({
|
|
status: z.enum(['DRAFT', 'OPEN', 'CLOSED', 'ON_HOLD']).optional().describe('Filter by job status'),
|
|
department: z.string().optional().describe('Filter by department'),
|
|
cursor: z.string().optional().describe('Pagination cursor'),
|
|
limit: z.number().min(1).max(500).default(100).optional().describe('Number of results per page'),
|
|
}),
|
|
handler: async (args: any) => {
|
|
const result = await client.listJobs(args);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
|
|
rippling_get_job: {
|
|
description: 'Get detailed job posting information',
|
|
inputSchema: z.object({
|
|
id: z.string().describe('Job ID'),
|
|
}),
|
|
handler: async (args: any) => {
|
|
const result = await client.getJob(args.id);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
|
|
rippling_list_applications: {
|
|
description: 'List job applications',
|
|
inputSchema: z.object({
|
|
candidateId: z.string().optional().describe('Filter by candidate ID'),
|
|
jobId: z.string().optional().describe('Filter by job ID'),
|
|
status: z.enum(['ACTIVE', 'HIRED', 'REJECTED', 'WITHDRAWN']).optional().describe('Filter by status'),
|
|
cursor: z.string().optional().describe('Pagination cursor'),
|
|
limit: z.number().min(1).max(500).default(100).optional().describe('Number of results per page'),
|
|
}),
|
|
handler: async (args: any) => {
|
|
const result = await client.listApplications(args);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: JSON.stringify(result, null, 2),
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
|
|
rippling_update_application_stage: {
|
|
description: 'Move an application to a different stage in the pipeline',
|
|
inputSchema: z.object({
|
|
id: z.string().describe('Application ID'),
|
|
stage: z.string().describe('New stage (e.g., "Phone Screen", "Technical Interview", "Offer")'),
|
|
}),
|
|
handler: async (args: any) => {
|
|
const { id, stage } = args;
|
|
const result = await client.updateApplicationStage(id, stage);
|
|
return {
|
|
content: [
|
|
{
|
|
type: 'text',
|
|
text: `Application stage updated successfully:\n${JSON.stringify(result, null, 2)}`,
|
|
},
|
|
],
|
|
};
|
|
},
|
|
},
|
|
};
|
|
}
|