Skip to main content
Glama
smaniches
by smaniches

semantic_scholar_search_authors

Search academic authors by name to discover researchers and their publications using Semantic Scholar's database.

Instructions

Search for academic authors by name.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Implementation Reference

  • The core handler function that implements the semantic_scholar_search_authors tool. It queries the Semantic Scholar API for authors matching the input query, handles pagination, and formats the response in markdown or JSON.
    async def search_authors(params: AuthorSearchInput) -> str: """Search for academic authors by name.""" logger.info(f"Searching authors: {params.query}") response = await _make_request("GET", "author/search", params={"query": params.query, "offset": params.offset, "limit": params.limit, "fields": ",".join(AUTHOR_FIELDS)}) total, authors = response.get("total", 0), response.get("data", []) if params.response_format == ResponseFormat.JSON: return json.dumps({"query": params.query, "total": total, "authors": authors}, indent=2) lines = [f"## Author Search: \"{params.query}\"", f"**Found:** {total} authors", ""] for author in authors: lines.append(_format_author_markdown(author)) return "\n".join(lines)
  • Pydantic input model defining the schema and validation for the tool's parameters.
    class AuthorSearchInput(BaseModel): model_config = ConfigDict(str_strip_whitespace=True, extra="forbid") query: str = Field(..., description="Author name to search", min_length=1, max_length=200) limit: int = Field(default=10, description="Max results", ge=1, le=100) offset: int = Field(default=0, description="Pagination offset", ge=0) response_format: ResponseFormat = Field(default=ResponseFormat.MARKDOWN, description="Output format")
  • MCP decorator registering the search_authors function as the tool named semantic_scholar_search_authors.
    @mcp.tool(name="semantic_scholar_search_authors")
  • Helper function to format author data into a readable markdown string, used in the tool's response.
    def _format_author_markdown(author: Dict[str, Any]) -> str: lines = [f"### {author.get('name', 'Unknown')}"] affiliations = author.get("affiliations") or [] if affiliations: lines.append(f"**Affiliations:** {', '.join(affiliations[:3])}") lines.append(f"**h-index:** {author.get('hIndex')} | **Papers:** {author.get('paperCount', 0)} | **Citations:** {author.get('citationCount', 0)}") if author.get("homepage"): lines.append(f"**Homepage:** {author['homepage']}") if author.get("url"): lines.append(f"**Profile:** [{author.get('authorId')}]({author['url']})") lines.append("") return "\n".join(lines)
  • List of fields requested from the Semantic Scholar API for author data.
    AUTHOR_FIELDS: List[str] = [ "authorId", "externalIds", "url", "name", "aliases", "affiliations", "homepage", "paperCount", "citationCount", "hIndex" ]

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/smaniches/semantic-scholar-mcp'

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