Skip to main content
Glama
Dianel555

Paper Search MCP

by Dianel555

search_scopus

Search the Scopus database for academic papers using filters like author, journal, year, and subject to find relevant research articles.

Instructions

Search the Scopus abstract and citation database (requires Elsevier API key)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string
maxResultsNoMaximum number of results (max 25 per request)
yearNoYear filter (e.g., "2023", "2020-2023")
authorNoAuthor name filter
journalNoJournal name filter
affiliationNoInstitution/affiliation filter
subjectNoSubject area filter
openAccessNoFilter for open access articles only
documentTypeNoDocument type: ar=article, cp=conference paper, re=review, bk=book, ch=chapter

Implementation Reference

  • Tool handler case for 'search_scopus': validates API key, extracts parameters, calls ScopusSearcher.search(), formats and returns results as JSON text.
    case 'search_scopus': {
      const { query, maxResults, year, author, journal, affiliation, subject, openAccess, documentType } = args;
      if (!process.env.ELSEVIER_API_KEY) {
        throw new Error('Elsevier API key not configured. Please set ELSEVIER_API_KEY environment variable.');
      }
    
      const results = await searchers.scopus.search(query, {
        maxResults,
        year,
        author,
        journal,
        affiliation,
        subject,
        openAccess,
        documentType
      } as any);
    
      return jsonTextResponse(
        `Found ${results.length} Scopus papers.\n\n${JSON.stringify(
          results.map((paper: Paper) => PaperFactory.toDict(paper)),
          null,
          2
        )}`
      );
    }
  • Core implementation of Scopus search: constructs advanced query syntax, makes API request to /content/search/scopus, parses XML/JSON response entries into Paper objects using private parseEntry method.
    async search(query: string, options: SearchOptions = {}): Promise<Paper[]> {
      const customOptions = options as any;
      if (!this.apiKey) {
        throw new Error('Scopus API key is required');
      }
    
      const maxResults = Math.min(options.maxResults || 10, 25); // Scopus max is 25 per request
      const papers: Paper[] = [];
    
      try {
        // Build Scopus search query
        let searchQuery = `TITLE-ABS-KEY(${query})`;
        
        if (options.author) {
          searchQuery += ` AND AUTHOR(${options.author})`;
        }
        
        if (options.journal) {
          searchQuery += ` AND SRCTITLE(${options.journal})`;
        }
        
        if (customOptions.affiliation) {
          searchQuery += ` AND AFFIL(${customOptions.affiliation})`;
        }
        
        if (customOptions.subject) {
          searchQuery += ` AND SUBJAREA(${customOptions.subject})`;
        }
        
        if (options.year) {
          if (options.year.includes('-')) {
            const [startYear, endYear] = options.year.split('-');
            searchQuery += ` AND PUBYEAR > ${parseInt(startYear) - 1}`;
            if (endYear) {
              searchQuery += ` AND PUBYEAR < ${parseInt(endYear) + 1}`;
            }
          } else {
            searchQuery += ` AND PUBYEAR = ${options.year}`;
          }
        }
    
        if (customOptions.openAccess) {
          searchQuery += ' AND OPENACCESS(1)';
        }
        
        if (customOptions.documentType) {
          const docTypeMap: Record<string, string> = {
            'ar': 'Article',
            'cp': 'Conference Paper',
            're': 'Review',
            'bk': 'Book',
            'ch': 'Book Chapter'
          };
          searchQuery += ` AND DOCTYPE(${docTypeMap[customOptions.documentType]})`;
        }
    
        await this.rateLimiter.waitForPermission();
    
        const response = await this.client.get<ScopusSearchResponse>('/content/search/scopus', {
          params: {
            query: searchQuery,
            count: maxResults,
            start: 0,
            view: 'COMPLETE',
            field: 'dc:identifier,dc:title,dc:creator,prism:publicationName,prism:coverDate,prism:doi,prism:url,prism:volume,prism:issueIdentifier,prism:pageRange,citedby-count,dc:description,authkeywords,author,affiliation,openaccess,eid'
          }
        });
    
        const entries = response.data['search-results']?.entry || [];
    
        for (const entry of entries) {
          const paper = await this.parseEntry(entry);
          if (paper) {
            papers.push(paper);
          }
        }
    
        return papers;
      } catch (error: any) {
        this.handleHttpError(error, 'search');
      }
    }
  • Zod schema definition for search_scopus input validation: defines query (required), maxResults (1-25), filters for year/author/journal/affiliation/subject/openAccess/documentType.
    export const SearchScopusSchema = z
      .object({
        query: z.string().min(1),
        maxResults: z.number().int().min(1).max(25).optional().default(10),
        year: z.string().optional(),
        author: z.string().optional(),
        journal: z.string().optional(),
        affiliation: z.string().optional(),
        subject: z.string().optional(),
        openAccess: z.boolean().optional(),
        documentType: z.enum(['ar', 'cp', 're', 'bk', 'ch']).optional()
      })
      .strip();
  • MCP tool registration: defines 'search_scopus' tool metadata including name, description, and inputSchema matching the Zod schema for MCP SDK compatibility.
    {
      name: 'search_scopus',
      description: 'Search the Scopus abstract and citation database (requires Elsevier API key)',
      inputSchema: {
        type: 'object',
        properties: {
          query: { type: 'string', description: 'Search query string' },
          maxResults: {
            type: 'number',
            minimum: 1,
            maximum: 25,
            description: 'Maximum number of results (max 25 per request)'
          },
          year: { type: 'string', description: 'Year filter (e.g., "2023", "2020-2023")' },
          author: { type: 'string', description: 'Author name filter' },
          journal: { type: 'string', description: 'Journal name filter' },
          affiliation: { type: 'string', description: 'Institution/affiliation filter' },
          subject: { type: 'string', description: 'Subject area filter' },
          openAccess: {
            type: 'boolean',
            description: 'Filter for open access articles only'
          },
          documentType: {
            type: 'string',
            enum: ['ar', 'cp', 're', 'bk', 'ch'],
            description: 'Document type: ar=article, cp=conference paper, re=review, bk=book, ch=chapter'
          }
        },
        required: ['query']
      }
    },
  • Schema parsing dispatcher: routes 'search_scopus' arguments to SearchScopusSchema.parse() for runtime validation.
        case 'search_scopus':
          return SearchScopusSchema.parse(args);
        case 'search_crossref':
          return SearchCrossrefSchema.parse(args);
        default:
          return args;
      }
    }
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 only mentions the API key requirement but doesn't describe what the search returns (abstracts, citations, metadata), pagination behavior, rate limits, authentication scope, or error conditions. For a search tool with 9 parameters, this leaves significant behavioral aspects unexplained.

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

Conciseness5/5

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

The description is a single, efficient sentence that communicates the core purpose and key prerequisite without any wasted words. It's appropriately sized and front-loaded with essential information, making it easy for an agent to parse quickly.

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 complexity of a 9-parameter search tool with no annotations and no output schema, the description is insufficient. It doesn't explain what results to expect (format, fields, limitations), how results are ordered, whether there's pagination, or how to interpret the various filters. The API key mention is helpful but doesn't compensate for the missing behavioral context.

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 9 parameters thoroughly. The description adds no parameter-specific information beyond what's in the schema. The baseline score of 3 reflects adequate coverage through the schema alone, though the description contributes nothing additional about parameter usage or interactions.

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 action ('Search') and target resource ('Scopus abstract and citation database'), making the purpose immediately understandable. It distinguishes from some siblings by specifying the Scopus database, but doesn't explicitly differentiate from other academic search tools like search_arxiv or search_pubmed beyond the database name.

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 the many sibling search tools available. It mentions the requirement for an Elsevier API key, which is a prerequisite but doesn't help the agent choose between Scopus and alternatives like Google Scholar, PubMed, or other databases for different search scenarios.

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