sch.search
Search academic sources including arXiv papers, Crossref publications, and Wikipedia entries for research and information retrieval.
Instructions
Academic-first search (arXiv + Crossref + Wikipedia).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | Yes | ||
| top | No | ||
| limit | No |
Implementation Reference
- src/tools/scholar.ts:70-77 (handler)Core handler function implementing the sch.search tool logic: performs parallel academic searches on arXiv, Crossref, and English Wikipedia, combines results, and limits to top * 2 entries.export async function schSearch(q: string, top = 5) { const [ax, cr, wiki] = await Promise.all([ arxivSearch(q, top), crossrefSearch(q, top), wikiSearch(q, 'en', top) ]); return [...ax, ...cr, ...wiki].slice(0, top * 2); }
- src/server.ts:159-159 (schema)Input schema/validation for the sch.search tool using Zod.const schSearchShape = { q: z.string(), top: z.number().int().optional(), limit: z.number().int().optional() };
- src/server.ts:160-166 (registration)Registration of the 'sch.search' tool on the MCP server, including description, schema, options, and thin wrapper handler delegating to schSearch.server.tool('sch.search', 'Academic-first search (arXiv + Crossref + Wikipedia).', schSearchShape, OPEN, async ({ q, top, limit }) => { const res = await schSearch(q, top ?? limit ?? 5); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; } );