- Greenhouse: 29 tools (was 18), added interviews, scorecards, organization - Lever: 26 tools (was 13), added tags, sources, expanded opportunities/postings - Loom: 25 tools (was 14), added analytics, privacy, search, workspace members All servers now have: - main.ts with env validation & graceful shutdown - server.ts with lazy-loaded tool modules - Zod validation on all inputs - Rich tool descriptions (when/why to use) - Pagination support on all list_* tools - Updated package.json (bin field, updated deps) - Updated README with coverage manifests - Old index.ts renamed to index.ts.bak - Zero TypeScript errors (npx tsc --noEmit verified)
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { z } from 'zod';
|
|
import type { ChargebeeClient } from '../client/chargebee-client.js';
|
|
export default [
|
|
{
|
|
name: 'chargebee_list_credit_notes',
|
|
description: 'Lists credit_notes from Chargebee with pagination. Up to 100 per page.',
|
|
inputSchema: {
|
|
type: 'object' as const,
|
|
properties: {
|
|
limit: { type: 'number', default: 100 },
|
|
offset: { type: 'string' },
|
|
},
|
|
},
|
|
handler: async (input: any, client: ChargebeeClient) => {
|
|
const result = await client.get('/credit_notes', input);
|
|
return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
|
|
},
|
|
},
|
|
{
|
|
name: 'chargebee_get_credit_notes',
|
|
description: 'Retrieves a credit_notes by ID.',
|
|
inputSchema: {
|
|
type: 'object' as const,
|
|
properties: { id: { type: 'string' } },
|
|
required: ['id'],
|
|
},
|
|
handler: async (input: any, client: ChargebeeClient) => {
|
|
const result = await client.get(`/credit_notes/${input.id}`);
|
|
return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }] };
|
|
},
|
|
},
|
|
];
|