mcpengine/servers/rippling/src/tools/benefits-tools.ts
Jake Shore 36a4d6fb4f rippling: Complete MCP server with 50+ tools, 16 React apps, full API client
- 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
2026-02-12 17:29:43 -05:00

86 lines
2.8 KiB
TypeScript

import { z } from 'zod';
import type { RipplingClient } from '../clients/rippling.js';
export function createBenefitsTools(client: RipplingClient) {
return {
rippling_list_benefits_plans: {
description: 'List all benefits plans',
inputSchema: z.object({
type: z.enum(['HEALTH', 'DENTAL', 'VISION', '401K', 'FSA', 'HSA', 'LIFE', 'DISABILITY', 'OTHER']).optional().describe('Filter by plan type'),
isActive: z.boolean().optional().describe('Filter by active 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.listBenefitsPlans(args);
return {
content: [
{
type: 'text',
text: JSON.stringify(result, null, 2),
},
],
};
},
},
rippling_get_benefits_plan: {
description: 'Get detailed information about a specific benefits plan',
inputSchema: z.object({
id: z.string().describe('Benefits plan ID'),
}),
handler: async (args: any) => {
const result = await client.getBenefitsPlan(args.id);
return {
content: [
{
type: 'text',
text: JSON.stringify(result, null, 2),
},
],
};
},
},
rippling_list_benefits_enrollments: {
description: 'List benefits enrollments',
inputSchema: z.object({
employeeId: z.string().optional().describe('Filter by employee ID'),
planId: z.string().optional().describe('Filter by plan ID'),
status: z.enum(['ACTIVE', 'PENDING', 'TERMINATED', 'WAIVED']).optional().describe('Filter by enrollment 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.listBenefitsEnrollments(args);
return {
content: [
{
type: 'text',
text: JSON.stringify(result, null, 2),
},
],
};
},
},
rippling_get_benefits_enrollment: {
description: 'Get detailed enrollment information including dependents',
inputSchema: z.object({
id: z.string().describe('Enrollment ID'),
}),
handler: async (args: any) => {
const result = await client.getBenefitsEnrollment(args.id);
return {
content: [
{
type: 'text',
text: JSON.stringify(result, null, 2),
},
],
};
},
},
};
}