search_sources
Search academic journals and sources in OpenAlex's scholarly database using queries, filters, and sorting to find relevant publications for research.
Instructions
Search journals and sources
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "search_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| search | No | Full-text search query | |
| filter | No | Key:value OpenAlex filters. Supports entity attributes (e.g., 'issn', 'country_code', 'is_oa'), IDs, and convenience filters (e.g., 'display_name.search'). Example: 'is_oa:true,type:journal' | |
| sort | No | Sort field with optional :desc | |
| page | No | Page number | |
| per_page | No | Results per page (max 200) | |
| cursor | No | Cursor for deep pagination | |
| group_by | No | Group results by field | |
| select | No | Fields to return | |
| sample | No | Random sample size | |
| seed | No | Random seed | |
| mailto | No | Email for rate limits | |
| api_key | No | Premium API key |
Implementation Reference
- src/tools/searchSources.ts:3-10 (handler)The core handler function that implements the logic for the 'search_sources' tool. It invokes the OpenAlex API for sources using makeOpenAlexRequest and formats the response as MCP content.
export async function searchSources(args: any) { return { content: [{ type: "text", text: JSON.stringify(await makeOpenAlexRequest("/sources", args), null, 2) }] }; } - src/index.ts:99-119 (schema)The input schema and metadata definition for the 'search_sources' tool, provided in the listTools response.
{ name: "search_sources", description: "Search journals and sources", inputSchema: { type: "object", properties: { search: { type: "string", description: "Full-text search query" }, filter: { type: "string", description: "Key:value OpenAlex filters. Supports entity attributes (e.g., 'issn', 'country_code', 'is_oa'), IDs, and convenience filters (e.g., 'display_name.search'). Example: 'is_oa:true,type:journal'" }, sort: { type: "string", description: "Sort field with optional :desc" }, page: { type: "number", description: "Page number" }, per_page: { type: "number", description: "Results per page (max 200)" }, cursor: { type: "string", description: "Cursor for deep pagination" }, group_by: { type: "string", description: "Group results by field" }, select: { type: "string", description: "Fields to return" }, sample: { type: "number", description: "Random sample size" }, seed: { type: "number", description: "Random seed" }, mailto: { type: "string", description: "Email for rate limits" }, api_key: { type: "string", description: "Premium API key" } } } }, - src/index.ts:285-286 (registration)Registers the handler by dispatching 'search_sources' tool calls to the searchSources function in the CallToolRequest handler.
case "search_sources": return await searchSources(args); - src/index.ts:24-24 (registration)Imports the searchSources handler function for use in the MCP server.
import { searchSources } from "./tools/searchSources.js";