icu:search
Search Court of Justice of the European Union decisions via InfoCuria to find case numbers, ECLI identifiers, dates, and document IDs for legal research.
Instructions
Search for decisions and opinions of the Court of Justice of the European Union (CJEU) via InfoCuria. Returns list with case numbers, ECLI, dates, and document IDs for retrieval.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search term (e.g., "Pelham", "Sampling", "Urheberrecht") | |
| language | Yes | Language code (e.g., "DE", "FR", "EN"). Default: DE | DE |
| limit | Yes | Maximum number of results (default: 10) |
Implementation Reference
- src/providers/icu/provider.ts:40-71 (handler)The handleSearch method within the IcuProvider class performs the API request to InfoCuria and formats the search results into Markdown.
private async handleSearch(args: Record<string, unknown>): Promise<ToolResult> { const { query, language = 'DE', limit = 10 } = args as { query: string; language?: string; limit?: number }; logger.info('Searching InfoCuria', { query, language }); const response = await axios.post(SEARCH_URL, { searchTerm: query, multiSearchTerms: [], sortTermList: [{ sortDirection: 'DESC', sortTerm: 'ALL_DATES' }], pagination: { pageNumber: 0, pageSize: limit, from: 1, to: limit * 2 }, language: language.toUpperCase(), tabName: 'tout_jurisprudence', isAllTabsRequest: false, isSearchExact: true, searchSources: ['document', 'metadata'], ecli: '', publishedId: '', usualName: '', logicDocId: '', }, { headers: HEADERS }); const hits = response.data.searchHits || []; const markdown = hits.map((hit: Record<string, Record<string, string>>, i: number) => { const c = hit.content; return `${i + 1}. **${c.docType}, ${c.docDate}, ${c.idPublished}**\n` + ` - ECLI: ${c.ecli || 'n/a'}\n` + ` - CELEX: \`${c.celex}\`\n` + ` - Court: ${c.affairJurisdiction}\n` + ` - Logic Doc ID: \`${c.logicDocId}\``; }).join('\n\n'); return { content: [{ type: 'text', text: `Found ${response.data.totalHits} results (showing ${hits.length}):\n\n${markdown}` }], }; } - Definition and input validation schema for the 'icu:search' tool.
{ name: 'icu:search', description: 'Search for decisions and opinions of the Court of Justice of the European Union (CJEU) via InfoCuria. ' + 'Returns list with case numbers, ECLI, dates, and document IDs for retrieval.', inputSchema: z.object({ query: z.string().describe('Search term (e.g., "Pelham", "Sampling", "Urheberrecht")'), language: z.string().optional().default('DE').describe('Language code (e.g., "DE", "FR", "EN"). Default: DE'), limit: z.number().optional().default(10).describe('Maximum number of results (default: 10)'), }), }, - src/providers/icu/provider.ts:31-31 (registration)Tool call dispatching to the handler in the IcuProvider.
if (toolName === 'icu:search') return this.handleSearch(args);