Skip to main content
Glama
stier1ba

LicenseSpring MCP Server

by stier1ba

check_license

Verify license status and validity by providing a license key, hardware ID, and product details. Ensures proper license management and compliance.

Instructions

Check license status and validity

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hardware_idYes
license_keyYes
productYes

Implementation Reference

  • Executes the tool logic by querying the LicenseSpring API /api/v4/check_license with license_key, hardware_id, and product parameters, returns JSON response or formatted error.
    }, async ({ license_key, hardware_id, product }) => {
      try {
        const queryParams = new URLSearchParams({
          license_key,
          hardware_id,
          product,
        });
        const response = await apiClient.get(`/api/v4/check_license?${queryParams}`);
        
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `Error checking license: ${handleApiError(error)}`,
          }],
          isError: true,
        };
      }
  • Zod schema for input validation in the tool registration.
    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'),
    },
  • Registers the 'check_license' tool with MCP server, including title, description, input schema, and handler function.
    server.registerTool('check_license', {
      title: 'Check License',
      description: 'Check license status and validity',
      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'),
      },
    }, async ({ license_key, hardware_id, product }) => {
      try {
        const queryParams = new URLSearchParams({
          license_key,
          hardware_id,
          product,
        });
        const response = await apiClient.get(`/api/v4/check_license?${queryParams}`);
        
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `Error checking license: ${handleApiError(error)}`,
          }],
          isError: true,
        };
      }
    });
  • TypeScript interface defining the request parameters for check_license.
    export interface CheckLicenseRequest {
      license_key: string;
      hardware_id: string;
      product: string;
    }

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