Skip to main content
Glama
Dianel555

Paper Search MCP

by Dianel555

search_papers

Search academic papers across multiple platforms like arXiv, PubMed, and Google Scholar to find relevant research publications using customizable filters.

Instructions

Search academic papers from multiple sources including arXiv, Web of Science, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string
platformNoPlatform to search (default: crossref). Options: arxiv, webofscience/wos, pubmed, biorxiv, medrxiv, semantic, iacr, googlescholar/scholar, scihub, sciencedirect, springer, scopus, crossref, or all. Note: Wiley only supports PDF download by DOI, use download_paper instead.
maxResultsNoMaximum number of results to return
yearNoYear filter (e.g., "2023", "2020-2023", "2020-")
authorNoAuthor name filter
journalNoJournal name filter
categoryNoCategory filter (e.g., cs.AI for arXiv)
daysNoNumber of days to search back (bioRxiv/medRxiv only)
fetchDetailsNoFetch detailed information (IACR only)
fieldsOfStudyNoFields of study filter (Semantic Scholar only)
sortByNoSort results by relevance, date, or citations
sortOrderNoSort order: ascending or descending

Implementation Reference

  • Handler logic for the 'search_papers' tool. Parses arguments, constructs search options, performs search on specified platform or 'all' with fallback, and returns JSON-formatted results.
    case 'search_papers': {
      const {
        query,
        platform,
        maxResults,
        year,
        author,
        journal,
        category,
        days,
        fetchDetails,
        fieldsOfStudy,
        sortBy,
        sortOrder
      } = args;
    
      const results: Record<string, any>[] = [];
      const searchOptions: SearchOptions = {
        maxResults,
        year,
        author,
        journal,
        category,
        days,
        fetchDetails,
        fieldsOfStudy,
        sortBy,
        sortOrder
      };
    
      if (platform === 'all') {
        try {
          const platformResults = await searchers.crossref.search(query, searchOptions);
          results.push(...platformResults.map((paper: Paper) => PaperFactory.toDict(paper)));
        } catch (error) {
          logDebug('Error searching crossref:', error);
          try {
            const platformResults = await searchers.arxiv.search(query, searchOptions);
            results.push(...platformResults.map((paper: Paper) => PaperFactory.toDict(paper)));
          } catch (fallbackError) {
            logDebug('Error with arxiv fallback:', fallbackError);
          }
        }
      } else {
        const searcher = (searchers as any)[platform];
        if (!searcher) {
          throw new Error(`Unsupported platform: ${platform}`);
        }
    
        const platformResults = await (searcher as PaperSource).search(query, searchOptions);
        results.push(...platformResults.map((paper: Paper) => PaperFactory.toDict(paper)));
      }
    
      return jsonTextResponse(`Found ${results.length} papers.\n\n${JSON.stringify(results, null, 2)}`);
    }
  • Zod schema definition for validating input arguments to the 'search_papers' tool, including query, platform options, filters, and sorting.
    export const SearchPapersSchema = z
      .object({
        query: z.string().min(1),
        platform: z
          .enum([
            'arxiv',
            'webofscience',
            'pubmed',
            'wos',
            'biorxiv',
            'medrxiv',
            'semantic',
            'iacr',
            'googlescholar',
            'scholar',
            'scihub',
            'sciencedirect',
            'springer',
            'scopus',
            'crossref',
            'all'
          ])
          .optional()
          .default('crossref'),
        maxResults: z.number().int().min(1).max(100).optional().default(10),
        year: z.string().optional(),
        author: z.string().optional(),
        journal: z.string().optional(),
        category: z.string().optional(),
        days: z.number().int().min(1).max(3650).optional(),
        fetchDetails: z.boolean().optional(),
        fieldsOfStudy: z.array(z.string()).optional(),
        sortBy: SortBySchema.optional().default('relevance'),
        sortOrder: SortOrderSchema.optional().default('desc')
      })
      .strip();
  • src/mcp/tools.ts:4-70 (registration)
    MCP tool registration for 'search_papers', including name, description, and input schema definition.
    {
      name: 'search_papers',
      description: 'Search academic papers from multiple sources including arXiv, Web of Science, etc.',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search query string' },
          platform: {
            type: 'string',
            enum: [
              'arxiv',
              'webofscience',
              'pubmed',
              'wos',
              'biorxiv',
              'medrxiv',
              'semantic',
              'iacr',
              'googlescholar',
              'scholar',
              'scihub',
              'sciencedirect',
              'springer',
              'scopus',
              'crossref',
              'all'
            ],
            description:
              'Platform to search (default: crossref). Options: arxiv, webofscience/wos, pubmed, biorxiv, medrxiv, semantic, iacr, googlescholar/scholar, scihub, sciencedirect, springer, scopus, crossref, or all. Note: Wiley only supports PDF download by DOI, use download_paper instead.'
          },
          maxResults: {
            type: 'number',
            minimum: 1,
            maximum: 100,
            description: 'Maximum number of results to return'
          },
          year: { type: 'string', description: 'Year filter (e.g., "2023", "2020-2023", "2020-")' },
          author: { type: 'string', description: 'Author name filter' },
          journal: { type: 'string', description: 'Journal name filter' },
          category: { type: 'string', description: 'Category filter (e.g., cs.AI for arXiv)' },
          days: {
            type: 'number',
            description: 'Number of days to search back (bioRxiv/medRxiv only)'
          },
          fetchDetails: {
            type: 'boolean',
            description: 'Fetch detailed information (IACR only)'
          },
          fieldsOfStudy: {
            type: 'array',
            items: { type: 'string' },
            description: 'Fields of study filter (Semantic Scholar only)'
          },
          sortBy: {
            type: 'string',
            enum: ['relevance', 'date', 'citations'],
            description: 'Sort results by relevance, date, or citations'
          },
          sortOrder: {
            type: 'string',
            enum: ['asc', 'desc'],
            description: 'Sort order: ascending or descending'
          }
        },
        required: ['query']
      }
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states it 'searches' papers, implying a read-only operation, but doesn't mention any behavioral traits like rate limits, authentication needs, pagination, or what the output looks like (e.g., format, fields returned). For a tool with 12 parameters and no output schema, this leaves significant gaps in understanding how it behaves.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized for a search tool, though it could be slightly more informative given the tool's complexity. The structure is front-loaded with the main purpose.

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

Completeness2/5

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

Given the tool's high complexity (12 parameters, many siblings, no output schema, and no annotations), the description is inadequate. It doesn't explain the relationship with sibling tools, output format, or behavioral constraints. For a multi-platform search tool with extensive parameters, more context is needed to guide effective use.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds no parameter-specific information beyond implying a multi-source search capability, which relates to the 'platform' parameter. It doesn't provide additional context like default behaviors or parameter interactions, so it meets the baseline for high schema coverage.

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 tool's purpose: 'Search academic papers from multiple sources including arXiv, Web of Science, etc.' It specifies the verb ('search') and resource ('academic papers'), and mentions the multi-source capability. However, it doesn't explicitly differentiate from sibling tools like search_arxiv or search_crossref, which are more specialized versions.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus its many siblings (e.g., search_arxiv, search_crossref). It mentions 'multiple sources' but doesn't clarify if this is a unified search across all platforms or how it differs from using individual platform-specific tools. The only usage hint is in the input schema's platform parameter description, which notes 'Wiley only supports PDF download by DOI, use download_paper instead,' but this isn't in the main description.

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/Dianel555/paper-search-mcp-nodejs'

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