Skip to main content
Glama

validate_connection

Read-only

Test the connection to LibreLinkUp servers and verify credentials are working. Use this to diagnose errors or after updating credentials.

Instructions

Test the connection to LibreLinkUp servers and verify your credentials are working. Use this if you encounter errors or after updating credentials.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The actual implementation of validateConnection - tries getCurrentGlucose(), returns true on success, false on error.
    async validateConnection(): Promise<boolean> {
      try {
        await this.getCurrentGlucose();
        return true;
      } catch {
        return false;
      }
    }
  • Schema definition for validate_connection tool, with no required input parameters and readOnlyHint.
    {
      name: 'validate_connection',
      description: 'Test the connection to LibreLinkUp servers and verify your credentials are working. Use this if you encounter errors or after updating credentials.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      annotations: {
        readOnlyHint: true
      }
    },
  • The MCP tool handler for 'validate_connection' case - calls client.validateConnection() and returns formatted result.
    case 'validate_connection': {
      if (!client) {
        throw new Error('LibreLinkUp not configured. Use configure_credentials first.');
      }
    
      const isValid = await client.validateConnection();
    
      if (isValid) {
        const glucose = await client.getCurrentGlucose();
        const sessionStatus = client.getSessionStatus();
    
        return {
          content: [{
            type: 'text',
            text: `LibreLinkUp connection validated successfully!\n\nCurrent glucose: ${glucose.value} mg/dL (${glucose.trend})\n\nSession status:\n- Authenticated: ${sessionStatus.authenticated}\n- Token valid: ${sessionStatus.tokenValid}\n- Expires: ${sessionStatus.expiresAt?.toISOString() || 'N/A'}`
          }]
        };
      } else {
        return {
          content: [{
            type: 'text',
            text: 'LibreLinkUp connection failed. Please check:\n1. Your credentials are correct\n2. You have accepted Terms & Conditions in LibreLinkUp app\n3. Someone is sharing data with you (or you shared your own)'
          }]
        };
      }
    }
  • src/index.ts:204-215 (registration)
    Tool registration entry in the tools array listing validate_connection.
    {
      name: 'validate_connection',
      description: 'Test the connection to LibreLinkUp servers and verify your credentials are working. Use this if you encounter errors or after updating credentials.',
      inputSchema: {
        type: 'object',
        properties: {},
        required: []
      },
      annotations: {
        readOnlyHint: true
      }
    },
Behavior4/5

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

The annotation 'readOnlyHint: true' already indicates this is a safe read operation. The description adds that it tests connection and credentials, which is consistent. It does not elaborate on specific outcomes but remains adequate for the tool's simplicity.

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 two sentences long, front-loaded with the action, and contains no unnecessary words. Every sentence earns its place.

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

Completeness5/5

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

Given the tool has no parameters, no output schema, and is simple (connection test), the description is sufficiently complete. It covers purpose and usage guidance.

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

Parameters4/5

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

The input schema has no parameters and the schema description coverage is 100%. With zero parameters, baseline is 4, and the description adds no parameter info needed.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Test the connection to LibreLinkUp servers and verify your credentials are working.' It uses a specific verb 'test' and resource 'connection to servers/credentials', and distinguishes from sibling tools like 'configure_credentials' or 'clear_session'.

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

Usage Guidelines5/5

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

The description explicitly states when to use: 'if you encounter errors or after updating credentials'. This provides clear context and alternative triggers for usage.

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

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/sedoglia/librelink-mcp-server'

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