Skip to main content
Glama

activate_license

Activate a software license by providing a license key, hardware ID, and product code. This tool integrates with LicenseSpring APIs to manage licensing operations effectively.

Instructions

Activate a license with hardware ID and product code

Input Schema

NameRequiredDescriptionDefault
hardware_idYes
license_keyYes
productYes
quantityNo

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "hardware_id": { "minLength": 1, "type": "string" }, "license_key": { "minLength": 1, "type": "string" }, "product": { "minLength": 1, "type": "string" }, "quantity": { "default": 1, "type": "number" } }, "required": [ "license_key", "hardware_id", "product" ], "type": "object" }

Implementation Reference

  • The async handler function that executes the activate_license tool logic by posting to the LicenseSpring API endpoint and formatting the response or error.
    }, async ({ license_key, hardware_id, product, quantity }) => { try { const response = await apiClient.post('/api/v4/activate_license', { license_key, hardware_id, product, quantity, }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error activating license: ${handleApiError(error)}`, }], isError: true, }; } });
  • Runtime Zod schema defining input parameters for the activate_license tool.
    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().optional().default(1), },
  • Registration of the 'activate_license' MCP tool with title, description, input schema, and inline handler function.
    server.registerTool('activate_license', { title: 'Activate License', description: 'Activate a license with hardware ID and product code', 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().optional().default(1), }, }, async ({ license_key, hardware_id, product, quantity }) => { try { const response = await apiClient.post('/api/v4/activate_license', { license_key, hardware_id, product, quantity, }); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error activating license: ${handleApiError(error)}`, }], isError: true, }; } });
  • TypeScript type interface defining the structure of the ActivateLicenseRequest used in the tool.
    export interface ActivateLicenseRequest { license_key: string; hardware_id: string; product: string; quantity?: number; }

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/stier1ba/licensespring-mcp'

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