All files / src/mcp/ep-open-data config.ts

100% Statements 6/6
100% Branches 0/0
100% Functions 0/0
100% Lines 6/6

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39                      2x     2x             2x           2x         2x         2x  
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
// SPDX-License-Identifier: Apache-2.0
 
/**
 * @module MCP/ep-open-data/config
 * @description Module-level constants for the EP Open Data Portal client.
 */
 
import type { MCPToolResult } from '../../types/index.js';
 
/** Default base URL for the EP Open Data Portal API v2. */
export const DEFAULT_EP_OPEN_DATA_BASE_URL = 'https://data.europarl.europa.eu/api/v2';
 
/** Default per-request timeout (milliseconds). */
export const DEFAULT_EP_OPEN_DATA_TIMEOUT_MS = 30_000;
 
/**
 * Attribution string required by the EP Open Data Portal licence (CC BY 4.0).
 * Appended to every fallback response.
 */
export const EP_OPEN_DATA_ATTRIBUTION =
  'European Parliament Open Data Portal — https://data.europarl.europa.eu — CC BY 4.0';
 
/**
 * Generic empty-votes fallback payload returned when the portal call cannot
 * produce usable voting data.
 */
export const EMPTY_VOTES_FALLBACK: MCPToolResult = {
  content: [{ type: 'text', text: '{"votes":[]}' }],
};
 
/** Canonical tool name for EP voting records. */
export const EP_GET_VOTING_RECORDS_TOOL = 'ep-get-voting-records';
 
/**
 * Virtual tool names exposed by this client.
 */
export const EP_OPEN_DATA_TOOLS: readonly string[] = [EP_GET_VOTING_RECORDS_TOOL];