activate_offline
Activate software licenses offline by providing a license key, hardware ID, and product code for secure access without an active internet connection.
Instructions
Activate a license for offline use with hardware ID and product code
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hardware_id | Yes | ||
| license_key | Yes | ||
| product | Yes | ||
| quantity | No |
Implementation Reference
- src/license-api-server.ts:770-795 (handler)Executes the activate_offline tool by posting license activation data to the LicenseSpring API endpoint /api/v4/activate_offline and returns the JSON response or formatted error.}, async ({ license_key, hardware_id, product, quantity }) => { try { const requestData = { license_key, hardware_id, product, quantity, }; const response = await apiClient.post('/api/v4/activate_offline', requestData); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error activating license offline: ${handleApiError(error)}`, }], isError: true, }; } });
- src/license-api-server.ts:764-769 (schema)Zod validation schema defining required inputs for the activate_offline tool: license_key, hardware_id, product (required strings), quantity (optional number default 1, min 1).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'), quantity: z.number().min(1).optional().default(1), },
- src/license-api-server.ts:761-761 (registration)Registers the activate_offline MCP tool on the server with provided title, description, schema, and handler function.server.registerTool('activate_offline', {
- src/types/index.ts:115-120 (schema)TypeScript interface defining the structure of ActivateOfflineRequest matching the tool's input parameters.export interface ActivateOfflineRequest { license_key: string; hardware_id: string; product: string; quantity?: number; }