Skip to main content
Glama
Jazib-but

VAT Validation MCP Server

by Jazib-but

check_vies_status

Verify the operational status of the official EU VIES service and check which member states are currently available for VAT number validation.

Instructions

Check VIES service status and member state availability / Skontrolovať stav služby VIES a dostupnosť členských štátov

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that performs the HTTP GET to VIES /check-status API, parses the response using statusResponseSchema, and constructs the ServiceStatus object.
    async checkStatus(): Promise<ServiceStatus> {
      try {
        const response = await this.client.get('/check-status');
        const validatedData = statusResponseSchema.parse(response.data);
    
        return {
          isAvailable: validatedData.availabilityStatus === 'AVAILABLE',
          memberStates: validatedData.memberStates.map(ms => ({
            code: ms.memberStateCode,
            status: ms.availability,
          })),
          lastChecked: new Date().toISOString(),
        };
      } catch (error) {
        if (error instanceof ViesApiError) {
          try {
            const errorData = errorResponseSchema.parse(error.response);
            throw new Error(`VIES status check failed: ${errorData.error}${errorData.message ? ` - ${errorData.message}` : ''}`);
          } catch {
            throw error;
          }
        }
        throw error;
      }
    }
  • MCP CallToolRequest handler switch case for 'check_vies_status' that invokes ViesApiClient.checkStatus() and formats the result into MCP response.
    case 'check_vies_status': {
      const result = await this.viesClient.checkStatus();
      
      const responseText = this.formatStatusResult(result);
      
      return {
        content: [
          {
            type: 'text',
            text: responseText,
          },
        ],
      };
    }
  • src/index.ts:76-83 (registration)
    Tool registration in ListToolsRequest handler, defining name, description, and empty input schema.
    {
      name: 'check_vies_status',
      description: 'Check VIES service status and member state availability / Skontrolovať stav služby VIES a dostupnosť členských štátov',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • Zod schemas for VIES status response validation: memberStateStatusSchema and statusResponseSchema used in client.checkStatus().
    export const memberStateStatusSchema = z.object({
      memberStateCode: z.string(),
      availability: z.enum(['AVAILABLE', 'UNAVAILABLE', 'TIMEOUT']),
    });
    
    export const statusResponseSchema = z.object({
      availabilityStatus: z.enum(['AVAILABLE', 'UNAVAILABLE']),
      memberStates: z.array(memberStateStatusSchema),
    });
  • Helper function to format ServiceStatus result into bilingual text response for the MCP tool output.
    private formatStatusResult(result: any): string {
      let response = `VIES Service Status / Stav služby VIES:\n\n`;
      response += `Overall Status / Celkový stav: ${result.isAvailable ? 'AVAILABLE / DOSTUPNÁ' : 'UNAVAILABLE / NEDOSTUPNÁ'}\n`;
      response += `Last Checked / Posledná kontrola: ${result.lastChecked}\n\n`;
      response += `Member States Status / Stav členských štátov:\n`;
    
      for (const ms of result.memberStates) {
        const statusText = ms.status === 'AVAILABLE' ? 'AVAILABLE / DOSTUPNÁ' :
                          ms.status === 'UNAVAILABLE' ? 'UNAVAILABLE / NEDOSTUPNÁ' :
                          'TIMEOUT / ČASOVÝ LIMIT';
        response += `${ms.code}: ${statusText}\n`;
      }
    
      return response;
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. While 'check' implies a read-only operation, it doesn't specify whether this tool makes external API calls, has rate limits, requires authentication, returns real-time or cached data, or what happens when the service is unavailable. The description states what it does but not how it behaves.

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

Conciseness4/5

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

The description is appropriately concise - a single bilingual sentence that directly states the tool's purpose without unnecessary elaboration. The bilingual format adds minimal redundancy while serving accessibility. Every word contributes to understanding the tool's function.

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

Completeness3/5

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

For a zero-parameter status-checking tool with no annotations and no output schema, the description is minimally adequate. It tells what the tool does but lacks important context about what information is returned (e.g., status codes, timestamps, member state details) and operational considerations. The agent knows the purpose but not what to expect from execution.

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 tool has zero parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, maintaining focus on the tool's purpose. This meets the baseline expectation for parameterless tools.

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 tool's purpose: checking VIES service status and member state availability. It provides a specific verb ('check') and resource ('VIES service status'), though it doesn't explicitly differentiate from sibling tools like 'check_vat_test_service' which might also test service functionality. The bilingual nature (English/Slovak) doesn't affect clarity.

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?

The description provides no guidance on when to use this tool versus alternatives like 'check_vat_test_service' or 'list_eu_member_states'. It doesn't indicate whether this is for operational monitoring, pre-validation checks, or troubleshooting. The agent must infer usage context from the tool name alone.

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/Jazib-but/check-vat-vies-mcp-Jazib'

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