Skip to main content
Glama

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;

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