Skip to main content
Glama

get_recital

Read-only

Retrieve specific recital text from EU regulations like GDPR or AI Act to understand legal context and interpretation guidance for articles.

Instructions

Retrieve the full text of a specific recital from a regulation. Recitals provide context and interpretation guidance for articles.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regulationYesRegulation ID (e.g., "GDPR", "NIS2", "DORA")
recital_numberYesRecital number (e.g., 1, 83)

Implementation Reference

  • The implementation of the getRecital tool handler which queries the database for a specific recital.
    export async function getRecital(
      db: DatabaseAdapter,
      input: GetRecitalInput
    ): Promise<Recital | null> {
      const { regulation, recital_number } = input;
    
      // Validate recital_number is a safe integer
      if (!Number.isInteger(recital_number) || !Number.isFinite(recital_number)) {
        return null;
      }
    
      // Reject negative or unrealistic recital numbers
      if (recital_number < 1 || recital_number > 10000) {
        return null;
      }
    
      const sql = `
        SELECT
          regulation,
          recital_number,
          text,
          related_articles
        FROM recitals
        WHERE regulation = $1 AND recital_number = $2
      `;
    
      const result = await db.query(sql, [regulation, recital_number]);
    
      if (result.rows.length === 0) {
        return null;
      }
    
      const row = result.rows[0] as {
        regulation: string;
        recital_number: number;
        text: string;
        related_articles: string | null;
      };
    
      return {
        regulation: row.regulation,
        recital_number: row.recital_number,
        text: row.text,
        related_articles: row.related_articles ? JSON.parse(row.related_articles) : null,
      };
    }
  • The registration of the get_recital tool in the central registry, mapping it to the handler.
      name: 'get_recital',
      description: 'Retrieve the full text of a specific recital from a regulation. Recitals provide context and interpretation guidance for articles.',
      inputSchema: {
        type: 'object',
        properties: {
          regulation: {
            type: 'string',
            description: 'Regulation ID (e.g., "GDPR", "NIS2", "DORA")',
          },
          recital_number: {
            type: 'number',
            description: 'Recital number (e.g., 1, 83)',
          },
        },
        required: ['regulation', 'recital_number'],
      },
      handler: async (db, args) => {
        const input = args as unknown as GetRecitalInput;
        const recital = await getRecital(db, input);
        if (!recital) {
          throw new Error(`Recital ${input.recital_number} not found in ${input.regulation}`);
        }
        return recital;
      },
    },
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, covering safety profiles. The description adds valuable domain context (what recitals are for) and specifies 'full text' retrieval scope, but does not address error handling, not-found behavior, or rate limits.

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?

Two sentences totaling 21 words. The first states the action and target; the second provides essential domain context. No redundancy or filler—every word earns its place.

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 2-parameter schema with 100% coverage and presence of safety annotations, the description adequately explains the domain concept (recitals) and retrieval scope. Minor gap: without an output schema, it could briefly characterize the return format (e.g., plain text vs structured).

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?

Schema description coverage is 100%, with regulation and recital_number fully documented in the schema. The description does not add parameter-specific details (e.g., format constraints, valid ranges) beyond what the schema already provides, warranting the baseline score.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Retrieve') with clear resource ('full text of a specific recital') and distinguishes from sibling get_article by explaining that recitals 'provide context and interpretation guidance for articles', clarifying the distinct domain object being accessed.

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

Usage Guidelines4/5

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

The second sentence explains the functional role of recitals ('context and interpretation guidance'), which implicitly signals when to use this tool versus retrieving the articles themselves. However, it lacks explicit 'when not to use' guidance or named alternatives like get_article.

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