Skip to main content
Glama

sch_get

Retrieve scholarly research articles using DOI, arXiv ID, or URL to access academic papers and metadata for research purposes.

Instructions

Alias of sch.get

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doiNo
arxivIdNo
urlNo

Implementation Reference

  • Core handler function schGet that fetches scholarly article metadata from Crossref (DOI), arXiv (ID), or extracts DOI from URL.
    export async function schGet(args: { doi?: string, arxivId?: string, url?: string }) { if (args.doi) { const url = `https://api.crossref.org/works/${encodeURIComponent(args.doi)}`; const res = await fetchWithLimits(url, 8000, 1024*1024); if (res.body) { const it = JSON.parse(res.body.toString('utf-8')).message; return { title: (it.title && it.title[0]) || '', authors: (it.author || []).map((a:any) => [a.given, a.family].filter(Boolean).join(' ')), year: (it.created?.['date-parts']?.[0]?.[0]) || '', doi: it.DOI || '', url: it.URL || '', abstract: (it.abstract || '').replace(/<[^>]+>/g, ''), source: 'crossref' }; } } if (args.arxivId) { const items = await arxivSearch(`id:${args.arxivId}`, 1); return items[0] || null; } if (args.url) { const m = args.url.match(/10\.\d{4,9}\/[-._;()/:A-Z0-9]+/i); if (m) return schGet({ doi: m[0] }); } return null; }
  • src/server.ts:184-189 (registration)
    Registration of the 'sch_get' tool in the MCP server, which proxies to the schGet handler.
    server.tool('sch_get', 'Alias of sch.get', schGetShape, OPEN, async ({ doi, arxivId, url }) => { const res = await schGet({ doi, arxivId, url }); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; }
  • Zod schema defining the input parameters for the sch_get tool.
    const schGetShape = { doi: z.string().optional(), arxivId: z.string().optional(), url: z.string().optional() };
  • src/server.ts:177-183 (registration)
    Primary registration of the 'sch.get' tool (sch_get is an alias), proxying to schGet handler.
    server.tool('sch.get', 'Get scholarly metadata by DOI/arXivId/URL.', schGetShape, OPEN, async ({ doi, arxivId, url }) => { const res = await schGet({ doi, arxivId, url }); return { content: [{ type: 'text', text: JSON.stringify(res) }] }; } );

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/khanhs-234/tool4lm'

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