get_customer_license_users
Retrieve users associated with a specific license for a product and customer using the LicenseSpring MCP Server to manage license data effectively.
Instructions
Get customer license users for a specific license
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| customer | Yes | ||
| product | Yes |
Implementation Reference
- src/license-api-server.ts:736-759 (handler)Handler function that queries the LicenseSpring License API endpoint /api/v4/customer_license_users with product and customer parameters, returns JSON response or error.}, async ({ product, customer }) => { try { const queryParams = new URLSearchParams({ product, customer, }); const response = await apiClient.get(`/api/v4/customer_license_users?${queryParams}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error getting customer license users: ${handleApiError(error)}`, }], isError: true, }; } });
- src/license-api-server.ts:732-735 (schema)Zod validation schema for tool inputs: product (required string) and customer (required string).inputSchema: { product: z.string().min(1, 'Product code is required'), customer: z.string().min(1, 'Customer email or account code is required'), },
- src/license-api-server.ts:729-759 (registration)MCP server tool registration for 'get_customer_license_users' including title, description, input schema, and inline handler function.server.registerTool('get_customer_license_users', { title: 'Get Customer License Users', description: 'Get customer license users for a specific license', inputSchema: { product: z.string().min(1, 'Product code is required'), customer: z.string().min(1, 'Customer email or account code is required'), }, }, async ({ product, customer }) => { try { const queryParams = new URLSearchParams({ product, customer, }); const response = await apiClient.get(`/api/v4/customer_license_users?${queryParams}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error getting customer license users: ${handleApiError(error)}`, }], isError: true, }; } });