Skip to main content
Glama
wlmwwx
by wlmwwx

search_arxiv

Search academic papers and preprints on arXiv to find research papers, scientific studies, and technical literature across fields like AI, physics, and mathematics.

Instructions

Search academic papers and preprints on arXiv repository. Perfect for finding research papers, scientific studies, technical papers, and academic literature. Use this when researching scientific topics, looking for papers by specific authors, or finding the latest research in fields like AI, physics, mathematics, computer science, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesAcademic search terms, author names, or research topics (e.g., 'transformer neural networks', 'Einstein relativity', 'machine learning optimization'). Can be a single query string or an array of queries for parallel search.
numNoMaximum number of academic papers to return, between 1-100
tbsNoTime-based search parameter, e.g., 'qdr:h' for past hour, can be qdr:h, qdr:d, qdr:w, qdr:m, qdr:y

Implementation Reference

  • Handler function that orchestrates the search_arxiv tool: checks bearer token, calls executeArxivSearch helper, formats results using formatSingleSearchResultToContentItems, and handles errors.
    async ({ query, num, tbs }: SearchArxivArgs) => { try { const props = getProps(); const tokenError = checkBearerToken(props.bearerToken); if (tokenError) { return tokenError; } const searchResult = await executeArxivSearch({ query, num, tbs }, props.bearerToken); return { content: formatSingleSearchResultToContentItems(searchResult), }; } catch (error) { return createErrorResponse(`Error: ${error instanceof Error ? error.message : String(error)}`); } },
  • Registers the search_arxiv tool with McpServer, including description, Zod input schema, and inline handler function.
    server.tool( "search_arxiv", "Search academic papers and preprints on arXiv repository. Perfect for finding research papers, scientific studies, technical papers, and academic literature. Use this when researching scientific topics, looking for papers by specific authors, or finding the latest research in fields like AI, physics, mathematics, computer science, etc. 💡 Tip: Use `parallel_search_arxiv` if you need to run multiple arXiv searches simultaneously.", { query: z.string().describe("Academic search terms, author names, or research topics (e.g., 'transformer neural networks', 'Einstein relativity', 'machine learning optimization')"), num: z.number().default(30).describe("Maximum number of academic papers to return, between 1-100"), tbs: z.string().optional().describe("Time-based search parameter, e.g., 'qdr:h' for past hour, can be qdr:h, qdr:d, qdr:w, qdr:m, qdr:y") }, async ({ query, num, tbs }: SearchArxivArgs) => { try { const props = getProps(); const tokenError = checkBearerToken(props.bearerToken); if (tokenError) { return tokenError; } const searchResult = await executeArxivSearch({ query, num, tbs }, props.bearerToken); return { content: formatSingleSearchResultToContentItems(searchResult), }; } catch (error) { return createErrorResponse(`Error: ${error instanceof Error ? error.message : String(error)}`); } }, );
  • Core helper function that makes the HTTP request to Jina's search API (svip.jina.ai) specifically for arXiv domain, handling response and errors.
    export async function executeArxivSearch( searchArgs: SearchArxivArgs, bearerToken: string ): Promise<SearchResultOrError> { try { const response = await fetch('https://svip.jina.ai/', { method: 'POST', headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': `Bearer ${bearerToken}`, }, body: JSON.stringify({ q: searchArgs.query, domain: 'arxiv', num: searchArgs.num || 30, ...(searchArgs.tbs && { tbs: searchArgs.tbs }) }), }); if (!response.ok) { return { error: `arXiv search failed for query "${searchArgs.query}": ${response.statusText}` }; } const data = await response.json() as any; return { query: searchArgs.query, results: data.results || [] }; } catch (error) { return { error: `arXiv search failed for query "${searchArgs.query}": ${error instanceof Error ? error.message : String(error)}` }; } }
  • TypeScript interface defining the input arguments for search_arxiv tool.
    export interface SearchArxivArgs { query: string; num?: number; tbs?: string; }
  • src/index.ts:20-22 (registration)
    Top-level initialization that calls registerJinaTools to register all tools, including search_arxiv.
    // Register all Jina AI tools registerJinaTools(this.server, () => this.props); }

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/wlmwwx/jina-mcp'

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