Skip to main content
Glama

get_definitions

Read-only

Look up official definitions of terms from EU regulations like GDPR, AI Act, and DORA to clarify legal terminology and ensure compliance.

Instructions

Look up official definitions of terms from EU regulations. Terms are defined in each regulation's definitions article.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
termYesTerm to look up (e.g., "personal data", "incident", "processing")
regulationNoOptional: filter to specific regulation
limitNoMaximum results to return (default: 50)

Implementation Reference

  • The implementation of the get_definitions tool logic.
    export async function getDefinitions(
      db: DatabaseAdapter,
      input: DefinitionsInput
    ): Promise<Definition[]> {
      const { term, regulation } = input;
      let limit = input.limit ?? 50;
      if (!Number.isFinite(limit) || limit < 0) limit = 50;
      limit = Math.min(Math.floor(limit), 500);
    
      let sql = `
        SELECT
          term,
          regulation,
          article,
          definition
        FROM definitions
        WHERE term ILIKE $1
      `;
    
      // Escape LIKE wildcards in user input to prevent unintended pattern matching
      const escapedTerm = term.replace(/%/g, '\\%').replace(/_/g, '\\_');
      const params: (string | number)[] = [`%${escapedTerm}%`];
    
      if (regulation) {
        sql += ` AND regulation = $2`;
        params.push(regulation);
      }
    
      sql += ` ORDER BY regulation, term`;
      sql += ` LIMIT $${params.length + 1}`;
      params.push(limit);
    
      const result = await db.query(sql, params);
    
      return result.rows.map((row: any) => ({
        term: row.term,
        regulation: row.regulation,
        article: row.article,
        definition: row.definition,
      }));
    }
  • Input schema for the get_definitions tool.
    export interface DefinitionsInput {
      term: string;
      regulation?: string;
      limit?: number;
    }
  • Registration and tool definition for get_definitions within the registry.
      name: 'get_definitions',
      description: 'Look up official definitions of terms from EU regulations. Terms are defined in each regulation\'s definitions article.',
      inputSchema: {
        type: 'object',
        properties: {
          term: {
            type: 'string',
            description: 'Term to look up (e.g., "personal data", "incident", "processing")',
          },
          regulation: {
            type: 'string',
            description: 'Optional: filter to specific regulation',
          },
          limit: {
            type: 'number',
            description: 'Maximum results to return (default: 50)',
          },
        },
        required: ['term'],
      },
      handler: async (db, args) => {
        const input = args as unknown as DefinitionsInput;
        return await getDefinitions(db, input);
      },
    },
Behavior3/5

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

The annotations already establish readOnlyHint=true, so the description is not burdened with declaring safety properties. It adds value by specifying the data source ('definitions article'), which helps the agent understand the scope. It does not address edge cases (e.g., term not found) or pagination behavior beyond the limit parameter.

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 description consists of two efficient sentences with zero waste. The first front-loads the core purpose; the second provides essential provenance context. No sentences could be removed without information loss.

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?

For a read-only lookup tool with 100% schema coverage and clear annotations, the description is adequate. It specifies the domain (EU regulations) and source (definitions articles). Lacking an output schema, it could have described the return format (e.g., 'returns definition text'), but the tool's purpose is sufficiently clear for invocation.

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 adequately documents all three parameters including examples ('personal data', 'incident'). The description does not add parameter-specific semantics (e.g., regex patterns, case sensitivity for 'term'), so it appropriately rests at the baseline for high-coverage schemas.

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 specific action ('Look up') and resource ('official definitions of terms from EU regulations'). It implicitly distinguishes from sibling tools like get_article by specifying it retrieves definitions from 'definitions articles,' though it doesn't explicitly name alternative tools.

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 second sentence ('Terms are defined in each regulation's definitions article') provides implicit context about when to use this tool—specifically for terms that appear in definitions sections. However, it lacks explicit guidance on when NOT to use it (e.g., for full article text) or how it differs from search_regulations.

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