Skip to main content
Glama
getRegularizations.ts1.14 kB
import type { McpTool } from '../types.js'; import { z } from 'zod'; const paramsSchema = z.object({ clientId: z.number().describe('The client ID'), }); export const getRegularizationsTool: McpTool = { name: 'treasury_get_regularizations', description: 'List all regularizations for a specific client', inputSchema: { type: 'object', required: ['clientId'], properties: { clientId: { type: 'number', description: 'The client ID' }, }, }, handler: async (args, server) => { const params = paramsSchema.parse(args); try { const response = await server.treasuryEndpoint.getRegularizations(params.clientId); return { success: true, regularizations: response.regularization, pagination: response.pagination, message: `Found ${response.regularization.length} regularizations for client ID ${params.clientId}`, }; } catch (error: any) { if (error.code === 'NOT_FOUND') { return { success: false, error: `Client with ID ${params.clientId} not found`, }; } throw error; } }, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/andreagroferreira/invoiceexpress-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server