Skip to main content
Glama
stier1ba

LicenseSpring MCP Server

by stier1ba

Activate License

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

TableJSON Schema
NameRequiredDescriptionDefault
hardware_idYes
license_keyYes
productYes
quantityNo

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;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is an activation operation but provides no information about permissions required, whether this is a read or write operation, what happens on success/failure, or any side effects. For a tool that likely modifies license state, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point. Every word contributes to understanding the tool's purpose without any wasted text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter licensing activation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'activation' entails, what format parameters should be in, what happens on success, or how this differs from similar tools. The context demands more comprehensive guidance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'hardware ID and product code' which correspond to two of the four parameters. With 0% schema description coverage, this provides some semantic context but doesn't cover 'license_key' or 'quantity' parameters. The baseline would be lower given the coverage gap, but the description adds partial value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Activate') and resource ('a license'), and specifies two key parameters (hardware ID and product code). However, it doesn't distinguish this tool from sibling tools like 'activate_offline' or 'check_license', which likely have similar licensing-related purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided about when to use this tool versus alternatives like 'activate_offline' or 'deactivate_license'. The description only states what the tool does, not when it should be selected over other licensing tools in the server.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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