floating_borrow
Allocate a floating license for offline use by specifying license key, hardware ID, product, and duration via the LicenseSpring MCP Server.
Instructions
Borrow a floating license for offline use
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| borrowed_until | Yes | ||
| hardware_id | Yes | ||
| license_key | Yes | ||
| product | Yes |
Implementation Reference
- src/license-api-server.ts:568-592 (handler)The handler function that executes the floating_borrow tool logic: makes a POST request to the LicenseSpring API endpoint '/api/v4/floating/borrow' and returns the response or formatted error.}, async ({ license_key, hardware_id, product, borrowed_until }) => { try { const response = await apiClient.post('/api/v4/floating/borrow', { license_key, hardware_id, product, borrowed_until, }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error borrowing floating license: ${handleApiError(error)}`, }], isError: true, }; } });
- src/license-api-server.ts:562-567 (schema)Zod input validation schema for the floating_borrow tool parameters.inputSchema: { license_key: z.string().min(1, 'License key is required'), hardware_id: z.string().min(1, 'Hardware ID is required'), product: z.string().min(1, 'Product code is required'), borrowed_until: z.string().min(1, 'Borrow expiration date is required'), },
- src/license-api-server.ts:559-559 (registration)Registers the floating_borrow tool with the MCP server.server.registerTool('floating_borrow', {
- src/types/index.ts:78-83 (schema)TypeScript interface defining the input shape for FloatingBorrowRequest, used for typing the tool handler parameters.export interface FloatingBorrowRequest { license_key: string; hardware_id: string; product: string; borrowed_until: string; }