Skip to main content
Glama

ema_info

Access European Medicines Agency drug approvals, safety reviews, orphan designations, supply shortages, and regulatory documents for pharmaceutical intelligence.

Instructions

Unified tool for EMA (European Medicines Agency) drug information lookup. Provides access to EU drug approvals, EPARs, orphan designations, supply shortages, and regulatory information through EMA's public JSON API.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodYesThe operation to perform: search_medicines (search EU approved drugs), get_medicine_by_name (get specific medicine), get_orphan_designations (EU orphan drugs), get_supply_shortages (medicine shortages), get_referrals (EU safety reviews), get_post_auth_procedures (label updates), get_dhpcs (safety communications), get_psusas (periodic safety reports), get_pips (paediatric plans), get_herbal_medicines (herbal assessments), get_article58_medicines (non-EU use), search_epar_documents (EPAR docs), search_all_documents (all EMA docs), search_non_epar_documents (non-EPAR docs)
active_substanceNoFor search_medicines, get_supply_shortages: Active substance name (e.g., "semaglutide", "adalimumab")
therapeutic_areaNoFor search_medicines, get_orphan_designations: Therapeutic area or disease (e.g., "diabetes", "cancer", "multiple sclerosis")
statusNoFor search_medicines: Medicine status filter. For get_supply_shortages: "ongoing" or "resolved"
orphanNoFor search_medicines: Filter for orphan medicines only
primeNoFor search_medicines: Filter for PRIME (priority) medicines only
biosimilarNoFor search_medicines: Filter for biosimilar medicines only
conditional_approvalNoFor search_medicines: Filter for conditionally approved medicines
limitNoMaximum number of results to return (default: 100 for medicines, 50 for other methods)
nameNoFor get_medicine_by_name: Medicine trade name to search (e.g., "Ozempic", "Wegovy", "Humira")
yearNoFor get_orphan_designations, get_referrals: Filter by year (e.g., 2024, 2023)
safetyNoFor get_referrals: Filter for safety-related referrals (true=Yes, false=No)
medicine_nameNoFor get_supply_shortages, get_post_auth_procedures: Medicine name to filter

Implementation Reference

  • Main handler for the 'ema_info' tool. Uses CallToolRequestSchema to handle tool calls, validates the tool name, extracts the method parameter, and dispatches to the appropriate helper function via a switch statement. Returns JSON-formatted results or error responses.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      const { name, arguments: args } = request.params;
    
      if (name !== 'ema_info') {
        throw new Error(`Unknown tool: ${name}`);
      }
    
      try {
        const { method, ...params } = args;
    
        switch (method) {
          case 'search_medicines': {
            const results = await searchMedicines(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_medicine_by_name': {
            const { name } = params;
            if (!name) {
              throw new Error('name parameter is required for get_medicine_by_name');
            }
    
            const results = await getMedicineByName(name);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_orphan_designations': {
            const results = await getOrphanDesignations(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_supply_shortages': {
            const results = await getSupplyShortages(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_referrals': {
            const results = await getReferrals(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_post_auth_procedures': {
            const results = await getPostAuthProcedures(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_dhpcs': {
            const results = await getDhpcs(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_psusas': {
            const results = await getPsusas(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_pips': {
            const results = await getPips(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_herbal_medicines': {
            const results = await getHerbalMedicines(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'get_article58_medicines': {
            const results = await getArticle58Medicines(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'search_epar_documents': {
            const results = await searchEparDocuments(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'search_all_documents': {
            const results = await searchAllDocuments(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          case 'search_non_epar_documents': {
            const results = await searchNonEparDocuments(params);
            return {
              content: [
                {
                  type: 'text',
                  text: JSON.stringify(results, null, 2)
                }
              ]
            };
          }
    
          default:
            throw new Error(`Unknown method: ${method}`);
        }
      } catch (error) {
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                error: error.message,
                source: 'EMA MCP Server'
              }, null, 2)
            }
          ],
          isError: true
        };
      }
    });
  • Input schema definition for the 'ema_info' tool. Defines the 'method' parameter as required with 15 possible enum values (search_medicines, get_medicine_by_name, etc.), plus numerous optional filter parameters like active_substance, therapeutic_area, status, limit, etc.
    inputSchema: {
      type: 'object',
      properties: {
        method: {
          type: 'string',
          enum: ['search_medicines', 'get_medicine_by_name', 'get_orphan_designations', 'get_supply_shortages', 'get_referrals', 'get_post_auth_procedures', 'get_dhpcs', 'get_psusas', 'get_pips', 'get_herbal_medicines', 'get_article58_medicines', 'search_epar_documents', 'search_all_documents', 'search_non_epar_documents'],
          description: 'The operation to perform: search_medicines (search EU approved drugs), get_medicine_by_name (get specific medicine), get_orphan_designations (EU orphan drugs), get_supply_shortages (medicine shortages), get_referrals (EU safety reviews), get_post_auth_procedures (label updates), get_dhpcs (safety communications), get_psusas (periodic safety reports), get_pips (paediatric plans), get_herbal_medicines (herbal assessments), get_article58_medicines (non-EU use), search_epar_documents (EPAR docs), search_all_documents (all EMA docs), search_non_epar_documents (non-EPAR docs)',
          examples: ['search_medicines', 'get_dhpcs', 'search_epar_documents']
        },
        // Parameters for search_medicines
        active_substance: {
          type: 'string',
          description: 'For search_medicines, get_supply_shortages: Active substance name (e.g., "semaglutide", "adalimumab")',
          examples: ['semaglutide', 'adalimumab', 'pembrolizumab']
        },
        therapeutic_area: {
          type: 'string',
          description: 'For search_medicines, get_orphan_designations: Therapeutic area or disease (e.g., "diabetes", "cancer", "multiple sclerosis")',
          examples: ['diabetes', 'cancer', 'multiple sclerosis', 'obesity']
        },
        status: {
          type: 'string',
          description: 'For search_medicines: Medicine status filter. For get_supply_shortages: "ongoing" or "resolved"',
          examples: ['Authorised', 'Withdrawn', 'Refused', 'ongoing', 'resolved']
        },
        orphan: {
          type: 'boolean',
          description: 'For search_medicines: Filter for orphan medicines only',
          examples: [true, false]
        },
        prime: {
          type: 'boolean',
          description: 'For search_medicines: Filter for PRIME (priority) medicines only',
          examples: [true, false]
        },
        biosimilar: {
          type: 'boolean',
          description: 'For search_medicines: Filter for biosimilar medicines only',
          examples: [true, false]
        },
        conditional_approval: {
          type: 'boolean',
          description: 'For search_medicines: Filter for conditionally approved medicines',
          examples: [true, false]
        },
        limit: {
          type: 'integer',
          description: 'Maximum number of results to return (default: 100 for medicines, 50 for other methods)',
          examples: [10, 50, 100]
        },
        // Parameter for get_medicine_by_name
        name: {
          type: 'string',
          description: 'For get_medicine_by_name: Medicine trade name to search (e.g., "Ozempic", "Wegovy", "Humira")',
          examples: ['Ozempic', 'Wegovy', 'Humira', 'Keytruda']
        },
        // Parameters for get_orphan_designations
        year: {
          type: 'integer',
          description: 'For get_orphan_designations, get_referrals: Filter by year (e.g., 2024, 2023)',
          examples: [2024, 2023, 2022]
        },
        // Parameters for get_referrals
        safety: {
          type: 'boolean',
          description: 'For get_referrals: Filter for safety-related referrals (true=Yes, false=No)',
          examples: [true, false]
        },
        // Parameters for get_supply_shortages and get_post_auth_procedures
        medicine_name: {
          type: 'string',
          description: 'For get_supply_shortages, get_post_auth_procedures: Medicine name to filter',
          examples: ['Ozempic', 'Keytruda', 'Insulin lispro']
        }
      },
      required: ['method'],
      additionalProperties: false
    }
  • src/index.js:39-126 (registration)
    Tool registration using ListToolsRequestSchema. Registers 'ema_info' as a unified tool for EMA (European Medicines Agency) drug information lookup with comprehensive description of capabilities.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: 'ema_info',
            description: 'Unified tool for EMA (European Medicines Agency) drug information lookup. Provides access to EU drug approvals, EPARs, orphan designations, supply shortages, and regulatory information through EMA\'s public JSON API.',
            inputSchema: {
              type: 'object',
              properties: {
                method: {
                  type: 'string',
                  enum: ['search_medicines', 'get_medicine_by_name', 'get_orphan_designations', 'get_supply_shortages', 'get_referrals', 'get_post_auth_procedures', 'get_dhpcs', 'get_psusas', 'get_pips', 'get_herbal_medicines', 'get_article58_medicines', 'search_epar_documents', 'search_all_documents', 'search_non_epar_documents'],
                  description: 'The operation to perform: search_medicines (search EU approved drugs), get_medicine_by_name (get specific medicine), get_orphan_designations (EU orphan drugs), get_supply_shortages (medicine shortages), get_referrals (EU safety reviews), get_post_auth_procedures (label updates), get_dhpcs (safety communications), get_psusas (periodic safety reports), get_pips (paediatric plans), get_herbal_medicines (herbal assessments), get_article58_medicines (non-EU use), search_epar_documents (EPAR docs), search_all_documents (all EMA docs), search_non_epar_documents (non-EPAR docs)',
                  examples: ['search_medicines', 'get_dhpcs', 'search_epar_documents']
                },
                // Parameters for search_medicines
                active_substance: {
                  type: 'string',
                  description: 'For search_medicines, get_supply_shortages: Active substance name (e.g., "semaglutide", "adalimumab")',
                  examples: ['semaglutide', 'adalimumab', 'pembrolizumab']
                },
                therapeutic_area: {
                  type: 'string',
                  description: 'For search_medicines, get_orphan_designations: Therapeutic area or disease (e.g., "diabetes", "cancer", "multiple sclerosis")',
                  examples: ['diabetes', 'cancer', 'multiple sclerosis', 'obesity']
                },
                status: {
                  type: 'string',
                  description: 'For search_medicines: Medicine status filter. For get_supply_shortages: "ongoing" or "resolved"',
                  examples: ['Authorised', 'Withdrawn', 'Refused', 'ongoing', 'resolved']
                },
                orphan: {
                  type: 'boolean',
                  description: 'For search_medicines: Filter for orphan medicines only',
                  examples: [true, false]
                },
                prime: {
                  type: 'boolean',
                  description: 'For search_medicines: Filter for PRIME (priority) medicines only',
                  examples: [true, false]
                },
                biosimilar: {
                  type: 'boolean',
                  description: 'For search_medicines: Filter for biosimilar medicines only',
                  examples: [true, false]
                },
                conditional_approval: {
                  type: 'boolean',
                  description: 'For search_medicines: Filter for conditionally approved medicines',
                  examples: [true, false]
                },
                limit: {
                  type: 'integer',
                  description: 'Maximum number of results to return (default: 100 for medicines, 50 for other methods)',
                  examples: [10, 50, 100]
                },
                // Parameter for get_medicine_by_name
                name: {
                  type: 'string',
                  description: 'For get_medicine_by_name: Medicine trade name to search (e.g., "Ozempic", "Wegovy", "Humira")',
                  examples: ['Ozempic', 'Wegovy', 'Humira', 'Keytruda']
                },
                // Parameters for get_orphan_designations
                year: {
                  type: 'integer',
                  description: 'For get_orphan_designations, get_referrals: Filter by year (e.g., 2024, 2023)',
                  examples: [2024, 2023, 2022]
                },
                // Parameters for get_referrals
                safety: {
                  type: 'boolean',
                  description: 'For get_referrals: Filter for safety-related referrals (true=Yes, false=No)',
                  examples: [true, false]
                },
                // Parameters for get_supply_shortages and get_post_auth_procedures
                medicine_name: {
                  type: 'string',
                  description: 'For get_supply_shortages, get_post_auth_procedures: Medicine name to filter',
                  examples: ['Ozempic', 'Keytruda', 'Insulin lispro']
                }
              },
              required: ['method'],
              additionalProperties: false
            }
          }
        ]
      };
    });
  • Example helper function (searchMedicines) that implements the core logic for searching medicines in the EMA database. Makes HTTP requests to EMA's JSON API, applies filters, and returns structured results.
    async function searchMedicines(params = {}) {
      // Validate input parameters
      if (params.limit && (typeof params.limit !== 'number' || params.limit < 1 || params.limit > 10000)) {
        throw new Error('limit must be a number between 1 and 10000');
      }
    
      if (params.status && !['Authorised', 'Withdrawn', 'Refused', 'Suspended'].includes(params.status)) {
        throw new Error('status must be one of: Authorised, Withdrawn, Refused, Suspended');
      }
    
      const url = generateEmaUrl('medicines-output-medicines_json-report_en.json');
      const allMedicines = await makeEmaRequest(url);
    
      let results = allMedicines;
    
      // Filter by active substance
      if (params.active_substance) {
        const searchTerm = params.active_substance.toLowerCase();
        results = results.filter(m =>
          m.active_substance && m.active_substance.toLowerCase().includes(searchTerm)
        );
      }
    
      // Filter by therapeutic area
      if (params.therapeutic_area) {
        const searchTerm = params.therapeutic_area.toLowerCase();
        results = results.filter(m =>
          (m.therapeutic_area_mesh && m.therapeutic_area_mesh.toLowerCase().includes(searchTerm)) ||
          (m.therapeutic_indication && m.therapeutic_indication.toLowerCase().includes(searchTerm))
        );
      }
    
      // Filter by medicine status
      if (params.status) {
        results = results.filter(m => m.medicine_status === params.status);
      }
    
      // Filter by regulatory flags
      if (params.orphan === true) {
        results = results.filter(m => m.orphan_medicine === 'Yes');
      }
    
      if (params.prime === true) {
        results = results.filter(m => m.prime_priority_medicine === 'Yes');
      }
    
      if (params.biosimilar === true) {
        results = results.filter(m => m.biosimilar === 'Yes');
      }
    
      if (params.conditional_approval === true) {
        results = results.filter(m => m.conditional_approval === 'Yes');
      }
    
      // Apply limit
      const limit = params.limit || 100;
      results = results.slice(0, limit);
    
      return {
        total_count: results.length,
        results: results,
        source: 'EMA Medicines Database',
        source_url: url,
        last_updated: new Date().toISOString()
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool accesses EMA's public JSON API, which hints at read-only behavior, but doesn't explicitly state if it's read-only, requires authentication, has rate limits, or describes error handling. For a tool with 13 parameters and no annotations, this is a significant gap.

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 is front-loaded and efficiently structured in two sentences: the first states the unified purpose, and the second lists the accessible information types and API source. Every sentence earns its place without redundancy or fluff.

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

Completeness3/5

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

Given the tool's complexity (13 parameters, no output schema, no annotations), the description is adequate but incomplete. It covers the purpose and scope well but lacks details on behavioral traits, return values, or usage nuances. With no output schema, it should ideally hint at response formats, but it doesn't, leaving gaps for an AI agent.

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?

The schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema, such as explaining relationships between methods and parameters. Baseline 3 is appropriate when the schema does the heavy lifting.

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 clearly states the tool's purpose with specific verbs ('lookup', 'provides access to') and resources ('EMA drug information', 'EU drug approvals, EPARs, orphan designations, etc.'). It distinguishes this as a unified tool for EMA's public JSON API, making its scope explicit even without sibling 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 description implies usage for EMA-related drug information queries but provides no explicit guidance on when to use specific methods or alternatives. Without sibling tools, it doesn't need to differentiate, but it lacks context on prerequisites or optimal use cases for the various operations.

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/openpharma-org/ema-mcp'

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