Skip to main content
Glama

get_article_history

Retrieve the complete amendment history of EU regulation articles, including dates and change summaries, to track legislative evolution.

Instructions

Get the full version timeline for a specific article, showing all amendments with dates and change summaries. Premium feature — requires Ansvar Intelligence Portal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regulationYesRegulation ID (e.g., "NIS2", "DORA", "GDPR")
articleYesArticle number (e.g., "21", "6")

Implementation Reference

  • Implementation of the getArticleHistory tool handler.
    export async function getArticleHistory(
      db: DatabaseAdapter,
      input: GetArticleHistoryInput,
    ): Promise<ArticleHistory | { premium: false; message: string }> {
      if (!isPremiumEnabled()) {
        return { premium: false, message: PREMIUM_UPGRADE_MESSAGE };
      }
    
      if (!(await hasVersionsTable(db))) {
        throw new Error('Version tracking data not available in this database build.');
      }
    
      const { regulation, article } = input;
    
      // Find the parent article
      const articleResult = await db.query<{ rowid: number }>(
        'SELECT rowid FROM articles WHERE regulation = $1 AND article_number = $2',
        [regulation, article],
      );
    
      if (articleResult.rows.length === 0) {
        throw new Error(`Article ${article} not found in ${regulation}`);
      }
    
      const articleId = articleResult.rows[0].rowid;
    
      const versions = await db.query<{
        effective_date: string | null;
        superseded_date: string | null;
        change_summary: string | null;
        source_url: string | null;
      }>(
        `SELECT effective_date, superseded_date, change_summary, source_url
         FROM article_versions
         WHERE article_id = $1
         ORDER BY effective_date ASC`,
        [articleId],
      );
    
      const currentVersion =
        versions.rows.length > 0
          ? versions.rows[versions.rows.length - 1].effective_date
          : null;
    
      return {
        regulation,
        article,
        current_version: currentVersion,
        versions: versions.rows,
      };
    }
  • Input type definition for getArticleHistory.
    export interface GetArticleHistoryInput {
      regulation: string;
      article: string;
    }

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/Ansvar-Systems/eu-regulations'

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