Skip to main content
Glama

get_versions

Retrieve available software versions for a product using license key, hardware ID, and product details. Integrates with LicenseSpring MCP Server for streamlined license management.

Instructions

Get available software versions for a product

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hardware_idYes
license_keyYes
productYes

Implementation Reference

  • The handler function for the 'get_versions' tool. It takes license_key, hardware_id, and product as input, makes a GET request to the LicenseSpring API /api/v4/versions endpoint with these as query parameters, and returns the JSON response or an error message.
    }, async ({ license_key, hardware_id, product }) => { try { const queryParams = new URLSearchParams({ license_key, hardware_id, product, }); const response = await apiClient.get(`/api/v4/versions?${queryParams}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error getting versions: ${handleApiError(error)}`, }], isError: true, }; } });
  • The input schema for the 'get_versions' tool defined using Zod (z), validating the required string parameters: license_key, hardware_id, and product.
    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'), },
  • The registration of the 'get_versions' MCP tool on the server, including title, description, input schema, and inline handler function.
    server.registerTool('get_versions', { title: 'Get Software Versions', description: 'Get available software versions for a product', 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/versions?${queryParams}`); return { content: [{ type: 'text', text: JSON.stringify(response.data, null, 2), }], }; } catch (error) { return { content: [{ type: 'text', text: `Error getting versions: ${handleApiError(error)}`, }], isError: true, }; } });

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