Skip to main content
Glama
stier1ba

LicenseSpring MCP Server

by stier1ba

Track Device Variables

track_device_variables

Monitor and update custom variables for a device using license key, hardware ID, and product details to enhance license management and tracking capabilities.

Instructions

Track custom variables for a device

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hardware_idYes
license_keyYes
productYes
variablesYes

Implementation Reference

  • Handler function that POSTs the license_key, hardware_id, product, and variables to the LicenseSpring API /api/v4/track_device_variables endpoint, returning the JSON response or formatted error.
    }, async ({ license_key, hardware_id, product, variables }) => {
      try {
        const response = await apiClient.post('/api/v4/track_device_variables', {
          license_key,
          hardware_id,
          product,
          variables,
        });
    
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `Error tracking device variables: ${handleApiError(error)}`,
          }],
          isError: true,
        };
      }
    });
  • Input schema definition using Zod validators for the tool parameters: license_key, hardware_id, product, and variables (non-empty record). Includes title and description.
    title: 'Track Device Variables',
    description: 'Track custom variables for a device',
    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'),
      variables: z.record(z.string(), z.string()).refine(obj => Object.keys(obj).length > 0, 'At least one variable is required'),
  • Full registration of the 'track_device_variables' tool with MCP server, including schema, title, description, and inline handler function.
    server.registerTool('track_device_variables', {
      title: 'Track Device Variables',
      description: 'Track custom variables for a device',
      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'),
        variables: z.record(z.string(), z.string()).refine(obj => Object.keys(obj).length > 0, 'At least one variable is required'),
      },
    }, async ({ license_key, hardware_id, product, variables }) => {
      try {
        const response = await apiClient.post('/api/v4/track_device_variables', {
          license_key,
          hardware_id,
          product,
          variables,
        });
    
        return {
          content: [{
            type: 'text',
            text: JSON.stringify(response.data, null, 2),
          }],
        };
      } catch (error) {
        return {
          content: [{
            type: 'text',
            text: `Error tracking device variables: ${handleApiError(error)}`,
          }],
          isError: true,
        };
      }
    });
  • TypeScript interface defining the request shape for TrackDeviceVariablesRequest, matching the tool input.
    export interface TrackDeviceVariablesRequest {
      license_key: string;
      hardware_id: string;
      product: string;
      variables: Record<string, string>;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the action vaguely. It doesn't disclose if this is a read/write operation, requires authentication (implied by parameters like 'license_key'), has side effects, rate limits, or error handling. This leaves significant behavioral gaps for a tool with 4 required parameters and potential mutations.

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 extremely concise with a single sentence, front-loaded and free of unnecessary words. It efficiently states the core action without redundancy, making it easy to parse despite its informational gaps.

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?

Given the complexity (4 required parameters, nested 'variables' object, no annotations, no output schema), the description is incomplete. It doesn't explain the tool's behavior, parameter roles, or expected outcomes, making it inadequate for an agent to reliably invoke this tool without additional context or trial-and-error.

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

Parameters2/5

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

Schema description coverage is 0%, so the schema provides no parameter details. The description adds minimal meaning, mentioning 'custom variables' which loosely relates to the 'variables' parameter but doesn't explain the purpose of 'hardware_id', 'license_key', or 'product', or how variables are structured. It fails to compensate for the low coverage, leaving parameters largely undocumented.

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

Purpose3/5

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

The description states the action ('track') and resource ('custom variables for a device'), which provides a basic purpose. However, it's vague about what 'track' means operationally (e.g., create, update, or monitor variables) and doesn't distinguish it from sibling tools like 'get_device_variables' or 'add_consumption', leaving ambiguity in its specific function.

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 on when to use this tool versus alternatives. For example, it doesn't clarify if this is for setting variables (vs. 'get_device_variables' for reading) or how it relates to tools like 'add_consumption'. The description lacks context, prerequisites, or exclusions, offering minimal usage direction.

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