Skip to main content
Glama

sch_get

Retrieve scholarly research data by providing a DOI, arXiv ID, or URL. Integrates with TOOL4LM for enhanced local LLM capabilities, enabling efficient academic information access and document reading.

Instructions

Alias of sch.get

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
arxivIdNo
doiNo
urlNo

Implementation Reference

  • The schGet function implements the core logic for retrieving scholarly article metadata by DOI (via Crossref), arXiv ID (via arXiv search), or URL (extracts DOI). This is the handler executed by the 'sch_get' tool.
    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)
    MCP server registration for the 'sch_get' tool. It defines the tool name, description, input shape, and handler that wraps schGet and formats the response.
    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 (and sch.get): optional doi, arxivId, or url.
    const schGetShape = { doi: z.string().optional(), arxivId: z.string().optional(), url: z.string().optional() };
  • src/server.ts:177-182 (registration)
    Primary MCP server registration for the 'sch.get' tool, of which 'sch_get' is an alias. Same handler and schema.
    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