Skip to main content
Glama
Dianel555

Paper Search MCP

by Dianel555

search_crossref

Search academic papers from Crossref database to find scholarly publications with metadata filters for authors, years, and citations.

Instructions

Search academic papers from Crossref database. Free API with extensive scholarly metadata coverage across publishers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string
maxResultsNoMaximum number of results to return
yearNoYear filter (e.g., "2023", "2020-2023")
authorNoAuthor name filter
sortByNoSort results by relevance, date, or citations
sortOrderNoSort order: ascending or descending

Implementation Reference

  • Executes the search_crossref tool by calling the Crossref searcher's search method with parsed arguments and returns formatted JSON results.
    case 'search_crossref': {
      const { query, maxResults, year, author, sortBy, sortOrder } = args;
      const results = await searchers.crossref.search(query, {
        maxResults,
        year,
        author,
        sortBy,
        sortOrder
      });
    
      return jsonTextResponse(
        `Found ${results.length} Crossref papers.\n\n${JSON.stringify(
          results.map((paper: Paper) => PaperFactory.toDict(paper)),
          null,
          2
        )}`
      );
    }
  • Zod schema definition for validating search_crossref tool input arguments.
    export const SearchCrossrefSchema = z
      .object({
        query: z.string().min(1),
        maxResults: z.number().int().min(1).max(100).optional().default(10),
        year: z.string().optional(),
        author: z.string().optional(),
        sortBy: SortBySchema.optional().default('relevance'),
        sortOrder: SortOrderSchema.optional().default('desc')
      })
      .strip();
  • MCP tool registration entry defining name, description, and JSON input schema for search_crossref.
      name: 'search_crossref',
      description:
        'Search academic papers from Crossref database. Free API with extensive scholarly metadata coverage across publishers.',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search query string' },
          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")' },
          author: { type: 'string', description: 'Author name filter' },
          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']
      }
    }
  • Implements the core search logic for Crossref API, including query construction, filtering, sorting, API call, and response parsing.
    async search(query: string, options: SearchOptions = {}): Promise<Paper[]> {
      const maxResults = Math.min(options.maxResults || 10, 1000);
      
      const params: Record<string, any> = {
        query: query,
        rows: maxResults,
        mailto: this.mailto
      };
    
      // Build filters
      const filters: string[] = [];
    
      // Year filter
      if (options.year) {
        const yearMatch = options.year.match(/^(\d{4})(?:-(\d{4})?)?$/);
        if (yearMatch) {
          const startYear = yearMatch[1];
          const endYear = yearMatch[2] || startYear;
          if (startYear) {
            filters.push(`from-pub-date:${startYear}`);
          }
          if (endYear && endYear !== startYear) {
            filters.push(`until-pub-date:${endYear}`);
          }
        }
      }
    
      // Add filters
      if (filters.length > 0) {
        params.filter = filters.join(',');
      }
    
      // Sorting
      const sortMapping: Record<string, string> = {
        'relevance': 'relevance',
        'date': 'published',
        'citations': 'is-referenced-by-count'
      };
      params.sort = sortMapping[options.sortBy || 'relevance'] || 'relevance';
      params.order = options.sortOrder === 'asc' ? 'asc' : 'desc';
    
      try {
        const response = await this.client.get('', { params });
        
        if (response.status === 200 && response.data?.message?.items) {
          return this.parseSearchResponse(response.data);
        }
        
        return [];
      } catch (error: any) {
        this.handleHttpError(error, 'search');
      }
    }
  • Imports and instantiates the CrossrefSearcher, making it available as searchers.crossref for use in tool handlers.
    import { CrossrefSearcher } from '../platforms/CrossrefSearcher.js';
    import { logDebug } from '../utils/Logger.js';
    
    export interface Searchers {
      arxiv: ArxivSearcher;
      webofscience: WebOfScienceSearcher;
      pubmed: PubMedSearcher;
      wos: WebOfScienceSearcher;
      biorxiv: BioRxivSearcher;
      medrxiv: MedRxivSearcher;
      semantic: SemanticScholarSearcher;
      iacr: IACRSearcher;
      googlescholar: GoogleScholarSearcher;
      scholar: GoogleScholarSearcher;
      scihub: SciHubSearcher;
      sciencedirect: ScienceDirectSearcher;
      springer: SpringerSearcher;
      wiley: WileySearcher;
      scopus: ScopusSearcher;
      crossref: CrossrefSearcher;
    }
    
    let searchers: Searchers | null = null;
    
    export function initializeSearchers(): Searchers {
      if (searchers) return searchers;
    
      logDebug('Initializing searchers...');
    
      const arxivSearcher = new ArxivSearcher();
      const wosSearcher = new WebOfScienceSearcher(process.env.WOS_API_KEY, process.env.WOS_API_VERSION);
      const pubmedSearcher = new PubMedSearcher(process.env.PUBMED_API_KEY);
      const biorxivSearcher = new BioRxivSearcher('biorxiv');
      const medrxivSearcher = new MedRxivSearcher();
      const semanticSearcher = new SemanticScholarSearcher(process.env.SEMANTIC_SCHOLAR_API_KEY);
      const iacrSearcher = new IACRSearcher();
      const googleScholarSearcher = new GoogleScholarSearcher();
      const sciHubSearcher = new SciHubSearcher();
      const scienceDirectSearcher = new ScienceDirectSearcher(process.env.ELSEVIER_API_KEY);
      const springerSearcher = new SpringerSearcher(
        process.env.SPRINGER_API_KEY,
        process.env.SPRINGER_OPENACCESS_API_KEY
      );
      const wileySearcher = new WileySearcher(process.env.WILEY_TDM_TOKEN);
      const scopusSearcher = new ScopusSearcher(process.env.ELSEVIER_API_KEY);
      const crossrefSearcher = new CrossrefSearcher(process.env.CROSSREF_MAILTO);
    
      searchers = {
        arxiv: arxivSearcher,
        webofscience: wosSearcher,
        pubmed: pubmedSearcher,
        wos: wosSearcher,
        biorxiv: biorxivSearcher,
        medrxiv: medrxivSearcher,
        semantic: semanticSearcher,
        iacr: iacrSearcher,
        googlescholar: googleScholarSearcher,
        scholar: googleScholarSearcher,
        scihub: sciHubSearcher,
        sciencedirect: scienceDirectSearcher,
        springer: springerSearcher,
        wiley: wileySearcher,
        scopus: scopusSearcher,
        crossref: crossrefSearcher
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the API is 'free' and has 'extensive coverage,' which adds some context about cost and scope, but it doesn't cover critical behaviors like rate limits, authentication needs, error handling, or response format. For a search tool with no annotation coverage, this leaves significant gaps in understanding how the tool 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 concise and front-loaded, with two sentences that efficiently convey the core purpose and key features (free API, extensive coverage). There's no wasted text, and it avoids redundancy. However, it could be slightly more structured by explicitly separating purpose from behavioral context.

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 moderate complexity (6 parameters, no output schema, no annotations), the description is somewhat complete but has gaps. It covers the purpose and high-level context but lacks details on behavioral traits and usage guidelines. Without an output schema, it doesn't explain return values, which is a missed opportunity to add value beyond structured fields.

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%, meaning all parameters are documented in the input schema. The description doesn't add any specific parameter semantics beyond what the schema provides (e.g., it doesn't explain query syntax or year format details). According to the rules, with high schema coverage (>80%), the baseline is 3 even without param info in the description.

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 Crossref database.' It specifies the verb ('search'), resource ('academic papers'), and data source ('Crossref database'), making the intent unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'search_papers' or 'search_semantic_scholar' that might also search academic papers, which prevents a perfect score.

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 minimal usage guidance. It mentions that the API is 'free' and has 'extensive scholarly metadata coverage,' which hints at when to use it (e.g., for broad, cost-effective searches), but it doesn't explicitly state when to choose this tool over alternatives like 'search_pubmed' or 'search_arxiv' from the sibling list. No exclusions or specific contexts are provided.

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