arxiv:search
Search arXiv preprints to find academic papers by keywords, author, or category, retrieving metadata including abstracts and links for legal research integration.
Instructions
Search arXiv preprints by keywords, author, or category. Returns metadata: arXiv ID, title, authors, abstract, categories, PDF/HTML links. Use arxiv:get with the arXiv ID to retrieve full text.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query. Prefix with field: all:, ti:, au:, abs:, cat: (e.g., "ti:copyright AND cat:cs.CY") | |
| limit | Yes | Max results (default: 10) | |
| start | Yes | Offset for pagination | |
| sort_by | No | Sort order |
Implementation Reference
- The implementation of the arxiv:search tool handler, which processes the tool arguments, calls the ArxivClient, and formats the output.
export async function handleSearch(client: ArxivClient, args: Record<string, unknown>): Promise<ToolResult> { const { query, limit = 10, start = 0, sort_by } = args as { query: string; limit?: number; start?: number; sort_by?: string; }; const params: Record<string, string | number> = { search_query: query, max_results: limit, start }; if (sort_by) params.sortBy = sort_by; const { total, entries } = await client.search(params); const text = `${total} Treffer (showing ${entries.length})\n\n${entries.map(formatEntry).join('\n\n---\n\n')}`; return { content: [{ type: 'text', text }] }; } - Definition and input schema for the arxiv:search tool.
{ name: 'arxiv:search', description: 'Search arXiv preprints by keywords, author, or category. ' + 'Returns metadata: arXiv ID, title, authors, abstract, categories, PDF/HTML links. ' + 'Use arxiv:get with the arXiv ID to retrieve full text.', inputSchema: z.object({ query: z.string().describe('Search query. Prefix with field: all:, ti:, au:, abs:, cat: (e.g., "ti:copyright AND cat:cs.CY")'), limit: z.number().optional().default(10).describe('Max results (default: 10)'), start: z.number().optional().default(0).describe('Offset for pagination'), sort_by: z.enum(['relevance', 'lastUpdatedDate', 'submittedDate']).optional().describe('Sort order'), }), }, - src/providers/arxiv/provider.ts:15-15 (registration)Tool call routing for arxiv:search within the ArxivProvider.
case 'arxiv:search': return handleSearch(this.client, args);