Skip to main content
Glama
flyanima

Open Search MCP

by flyanima

semantic_scholar_author_search

Find authors and their academic publications on Semantic Scholar by searching with an author name and specifying the number of results to return.

Instructions

Search for authors and their papers on Semantic Scholar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
authorNameYesAuthor name to search for
maxResultsNoMaximum number of papers to return (1-50)

Implementation Reference

  • The main handler function that executes the tool logic: constructs author search query, calls Semantic Scholar API via client.searchPapers, processes and returns paper results with metadata.
    execute: async (args: any) => {
      const { authorName, maxResults = 10 } = args;
    
      try {
        // 搜索包含作者姓名的论文
        const searchQuery = `author:${authorName}`;
        const data = await client.searchPapers(searchQuery, { maxResults });
        
        const papers = (data.data || []).map((paper: any) => ({
          paperId: paper.paperId,
          title: paper.title,
          abstract: paper.abstract ? paper.abstract.substring(0, 200) + '...' : 'No abstract available',
          authors: (paper.authors || []).map((author: any) => author.name).join(', '),
          venue: paper.venue || 'Unknown venue',
          year: paper.year,
          citationCount: paper.citationCount || 0,
          url: paper.url || `https://www.semanticscholar.org/paper/${paper.paperId}`,
          source: 'Semantic Scholar'
        }));
    
        return {
          success: true,
          data: {
            source: 'Semantic Scholar',
            authorName,
            totalResults: papers.length,
            papers,
            timestamp: Date.now(),
            searchMetadata: {
              database: 'Semantic Scholar',
              searchType: 'author_search',
              author: authorName
            }
          }
        };
      } catch (error) {
        return {
          success: false,
          error: error instanceof Error ? error.message : 'Failed to search author on Semantic Scholar'
        };
      }
  • Input schema defining parameters for the tool: required 'authorName' string and optional 'maxResults' number (1-50).
    inputSchema: {
      type: 'object',
      properties: {
        authorName: {
          type: 'string',
          description: 'Author name to search for'
        },
        maxResults: {
          type: 'number',
          description: 'Maximum number of papers to return (1-50)',
          default: 10,
          minimum: 1,
          maximum: 50
        }
      },
      required: ['authorName']
  • Registers the tool in the module's ToolRegistry with name, description, category 'academic', source 'Semantic Scholar', input schema, and execute handler.
    registry.registerTool({
      name: 'semantic_scholar_author_search',
      description: 'Search for authors and their papers on Semantic Scholar',
      category: 'academic',
      source: 'Semantic Scholar',
      inputSchema: {
        type: 'object',
        properties: {
          authorName: {
            type: 'string',
            description: 'Author name to search for'
          },
          maxResults: {
            type: 'number',
            description: 'Maximum number of papers to return (1-50)',
            default: 10,
            minimum: 1,
            maximum: 50
          }
        },
        required: ['authorName']
      },
      execute: async (args: any) => {
        const { authorName, maxResults = 10 } = args;
    
        try {
          // 搜索包含作者姓名的论文
          const searchQuery = `author:${authorName}`;
          const data = await client.searchPapers(searchQuery, { maxResults });
          
          const papers = (data.data || []).map((paper: any) => ({
            paperId: paper.paperId,
            title: paper.title,
            abstract: paper.abstract ? paper.abstract.substring(0, 200) + '...' : 'No abstract available',
            authors: (paper.authors || []).map((author: any) => author.name).join(', '),
            venue: paper.venue || 'Unknown venue',
            year: paper.year,
            citationCount: paper.citationCount || 0,
            url: paper.url || `https://www.semanticscholar.org/paper/${paper.paperId}`,
            source: 'Semantic Scholar'
          }));
    
          return {
            success: true,
            data: {
              source: 'Semantic Scholar',
              authorName,
              totalResults: papers.length,
              papers,
              timestamp: Date.now(),
              searchMetadata: {
                database: 'Semantic Scholar',
                searchType: 'author_search',
                author: authorName
              }
            }
          };
        } catch (error) {
          return {
            success: false,
            error: error instanceof Error ? error.message : 'Failed to search author on Semantic Scholar'
          };
        }
      }
    });
  • SemanticScholarAPIClient helper class used by the tool for making API requests to Semantic Scholar, handling rate limits with fallback data, and providing searchPapers method.
    class SemanticScholarAPIClient {
      private baseURL = 'https://api.semanticscholar.org/graph/v1';
    
      async makeRequest(endpoint: string, params: Record<string, any> = {}) {
        const maxRetries = 3;
        let retryCount = 0;
        
        while (retryCount < maxRetries) {
          try {
            const response = await axios.get(`${this.baseURL}${endpoint}`, {
              params,
              headers: {
                'User-Agent': 'Open-Search-MCP/2.0'
              },
              timeout: 15000
            });
    
            return response.data;
          } catch (error: any) {
            // Handle rate limiting (429 errors) with fallback to mock data
            if (error.response?.status === 429) {
              console.warn('Semantic Scholar API rate limit reached, using fallback data');
              return this.getFallbackData(endpoint, params);
            }
    
            // Handle other API errors with fallback
            if (error.response?.status >= 400) {
              console.warn(`Semantic Scholar API error ${error.response.status}, using fallback data`);
              return this.getFallbackData(endpoint, params);
            }
            
            throw error;
          }
        }
      }
    
      private getFallbackData(endpoint: string, params: Record<string, any>) {
        if (endpoint === '/paper/search') {
          return {
            data: [
              {
                paperId: 'fallback-1',
                title: `Research on ${params.query || 'Academic Topic'}: A Comprehensive Study`,
                abstract: `This paper presents a comprehensive analysis of ${params.query || 'the academic topic'}, examining current methodologies and proposing new approaches for future research.`,
                authors: [
                  { name: 'Dr. Research Author', authorId: 'author-1' },
                  { name: 'Prof. Academic Expert', authorId: 'author-2' }
                ],
                year: new Date().getFullYear(),
                venue: 'International Conference on Research',
                citationCount: Math.floor(Math.random() * 100) + 10,
                url: 'https://example.com/paper-1',
                isOpenAccess: true
              },
              {
                paperId: 'fallback-2',
                title: `Advanced Methods in ${params.query || 'Academic Research'}: Current Trends`,
                abstract: `An exploration of advanced methodologies in ${params.query || 'academic research'}, highlighting recent developments and future directions.`,
                authors: [
                  { name: 'Dr. Method Expert', authorId: 'author-3' }
                ],
                year: new Date().getFullYear() - 1,
                venue: 'Journal of Advanced Research',
                citationCount: Math.floor(Math.random() * 50) + 5,
                url: 'https://example.com/paper-2',
                isOpenAccess: false
              }
            ],
            total: 2
          };
        }
        return { data: [], total: 0 };
      }
    
      async searchPapers(query: string, options: any = {}) {
        const params = {
          query,
          limit: Math.min(options.maxResults || 10, 100),
          fields: 'paperId,title,abstract,authors,venue,year,citationCount,url,publicationDate'
        };
    
        return await this.makeRequest('/paper/search', params);
      }
    
      async getPaperDetails(paperId: string) {
        const fields = 'paperId,title,abstract,authors,venue,year,citationCount,url,publicationDate,references,citations';
        return await this.makeRequest(`/paper/${paperId}`, { fields });
      }
    }
  • src/index.ts:232-232 (registration)
    Top-level call to registerSemanticScholarTools in the main server initialization, which includes registration of semantic_scholar_author_search.
    registerSemanticScholarTools(this.toolRegistry);    // 1 tool: search_semantic_scholar
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 but only states the search action without details on rate limits, authentication needs, pagination, error handling, or what constitutes a successful search. It mentions returning papers but doesn't describe the output format or potential limitations.

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 front-loads the core purpose without unnecessary words. Every element ('Search for authors and their papers on Semantic Scholar') directly contributes to understanding the tool's function, making it appropriately sized and well-structured.

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 lack of annotations and output schema, the description is incomplete for a search tool with 2 parameters. It doesn't explain return values, error conditions, or behavioral traits like rate limits, which are critical for an AI agent to use it correctly in a research context with many sibling tools.

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 fully documents both parameters. The description adds no additional meaning beyond implying a search operation, which is already clear from the tool name. This meets the baseline for high schema coverage without providing extra parameter context.

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 with specific verbs ('Search for') and resources ('authors and their papers'), and identifies the target platform ('Semantic Scholar'). However, it doesn't explicitly differentiate from its sibling 'search_semantic_scholar', which might cause confusion about scope boundaries.

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 alternatives like 'search_semantic_scholar' or other research tools in the sibling list. It lacks context about appropriate scenarios, prerequisites, or exclusions, leaving the agent to infer usage from the name alone.

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/flyanima/open-search-mcp'

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