Skip to main content
Glama

get_recent_changes

Read-only

Track regulatory updates by retrieving articles modified since a specified date, with change summaries and optional regulation filtering.

Instructions

List all articles that changed since a given date, with change summaries. Optionally filter to a specific regulation. Premium feature — requires Ansvar Intelligence Portal.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regulationNoOptional: filter to a specific regulation (e.g., "NIS2")
sinceYesISO date (e.g., "2024-06-01")
limitNoMaximum results (default: 50, max: 200)

Implementation Reference

  • The implementation of the getRecentChanges tool logic, which queries the database for recent changes to articles.
    export async function getRecentChanges(
      db: DatabaseAdapter,
      input: GetRecentChangesInput,
    ): Promise<{ since: string; changes: RecentChange[]; total: number } | { 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, since, limit } = input;
      const effectiveLimit = Math.min(limit ?? 50, 200);
    
      let sql = `
        SELECT
          a.regulation,
          a.article_number AS article,
          v.effective_date,
          v.change_summary,
          v.source_url
        FROM article_versions v
        JOIN articles a ON a.rowid = v.article_id
        WHERE v.effective_date >= $1
      `;
      const params: (string | number)[] = [since];
    
      if (regulation) {
        sql += ` AND a.regulation = $${params.length + 1}`;
        params.push(regulation);
      }
    
      sql += ` ORDER BY v.effective_date DESC LIMIT $${params.length + 1}`;
      params.push(effectiveLimit);
    
      const result = await db.query<RecentChange>(sql, params);
    
      return {
        since,
        changes: result.rows,
        total: result.rows.length,
      };
    }
  • The interface definition for the input to getRecentChanges.
    export interface GetRecentChangesInput {
      regulation?: string;
      since: string;
      limit?: number;
    }
  • The MCP tool registration and invocation logic for 'get_recent_changes'.
    name: 'get_recent_changes',
    description:
      'List all articles that changed since a given date, with change summaries. Optionally filter to a specific regulation. Premium feature — requires Ansvar Intelligence Portal.',
    inputSchema: {
      type: 'object',
      properties: {
        regulation: {
          type: 'string',
          description: 'Optional: filter to a specific regulation (e.g., "NIS2")',
        },
        since: {
          type: 'string',
          description: 'ISO date (e.g., "2024-06-01")',
        },
        limit: {
          type: 'number',
          description: 'Maximum results (default: 50, max: 200)',
        },
      },
      required: ['since'],
    },
    handler: async (db, args) => {
      const input = args as unknown as GetRecentChangesInput;
      return await getRecentChanges(db, input);
    },
Behavior4/5

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

While annotations confirm read-only/non-destructive safety, the description adds essential behavioral context: the premium authentication requirement and the fact that results include 'change summaries' (hinting at output format). This goes beyond the safety profile provided by annotations without contradicting them.

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 three-sentence structure is perfectly front-loaded: core function first, optional filtering second, and critical premium constraint third. Every sentence earns its place with zero redundancy or filler.

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

Completeness4/5

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

Given the simple 3-parameter schema with full coverage and existing annotations, the description is appropriately complete. It covers the core query pattern, optional filtering, and premium access constraint. It lacks explicit sibling differentiation, which prevents a perfect score, but adequately describes the tool's scope.

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

Parameters3/5

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

With 100% schema description coverage, the schema already fully documents the since date, regulation filter, and limit parameters. The description aligns with this ('since a given date', 'filter to a specific regulation') but adds no additional semantic details about formats or validation rules beyond what the schema provides, warranting the baseline score.

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 'List[s] all articles that changed since a given date, with change summaries,' providing a specific verb, resource, and scope. However, it does not explicitly differentiate from siblings like get_article_history or diff_article, which also deal with article changes over time.

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

Usage Guidelines3/5

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

The description provides critical prerequisite information (Premium feature — requires Ansvar Intelligence Portal) but offers no guidance on when to choose this over similar history-tracking siblings like get_article_history or diff_article. The usage relative to alternatives remains implied rather than explicit.

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

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