Skip to main content
Glama

sch_search

Search scholarly articles and academic papers using a query, with options to limit results and specify number of top results.

Instructions

Alias of sch.search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes
topNo
limitNo

Implementation Reference

  • src/server.ts:167-173 (registration)
    Registers the 'sch_search' tool as an alias of 'sch.search' on the MCP server, using schSearchShape for input schema and calling schSearch handler.
    server.tool('sch_search', 'Alias of sch.search',
      schSearchShape, OPEN,
      async ({ q, top, limit }) => {
        const res = await schSearch(q, top ?? limit ?? 5);
        return { content: [{ type: 'text', text: JSON.stringify(res) }] };
      }
    );
  • Defines the input schema (schSearchShape) for sch_search: q (string, required) and optional top and limit integers.
    const schSearchShape = { q: z.string(), top: z.number().int().optional(), limit: z.number().int().optional() };
  • The schSearch function that executes the search logic: concurrently queries arxivSearch, crossrefSearch, and wikiSearch, then merges and slices results.
    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);
    }
  • Helper function that searches arXiv API and returns scholarly article results.
    export async function arxivSearch(q: string, top = 5) {
      const url = `http://export.arxiv.org/api/query?search_query=all:${encodeURIComponent(q)}&start=0&max_results=${top}`;
      const res = await fetchWithLimits(url, 10000, 1024*1024);
      if (!res.body) return [];
      const xml = res.body.toString('utf-8');
      const parser = new XMLParser({ ignoreAttributes: false });
      const data: any = parser.parse(xml);
      const entries = Array.isArray(data.feed?.entry) ? data.feed.entry : (data.feed?.entry ? [data.feed.entry] : []);
      return entries.map((e: any) => {
        const id = (e.id || '').split('/abs/')[1] || e.id || '';
        const links = Array.isArray(e.link) ? e.link : [e.link];
        const pdf = links.find((l:any) => l['@_type'] === 'application/pdf')?.['@_href'] || '';
        return {
          title: (e.title || '').trim(),
          authors: (Array.isArray(e.author) ? e.author : [e.author]).map((a:any) => a.name),
          year: (e.published || '').slice(0,4),
          arxivId: id,
          pdfUrl: pdf,
          url: `https://arxiv.org/abs/${id}`,
          source: 'arxiv'
        };
      });
    }
  • Helper function that searches Crossref API and returns scholarly work results.
    export async function crossrefSearch(q: string, top = 5) {
      const url = `https://api.crossref.org/works?query=${encodeURIComponent(q)}&rows=${top}`;
      const res = await fetchWithLimits(url, 8000, 1024*1024);
      if (!res.body) return [];
      const data = JSON.parse(res.body.toString('utf-8'));
      return (data.message.items || []).map((it: any) => ({
        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]) || (it.issued?.['date-parts']?.[0]?.[0]) || '',
        doi: it.DOI || '',
        url: it.URL || '',
        source: 'crossref'
      }));
    }
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds no behavioral information beyond the annotation openWorldHint=true. It fails to disclose any traits like return format, side effects, or relationships.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness1/5

Is the description appropriately sized, front-loaded, and free of redundancy?

While concise, the description is too vague to be useful. It sacrifices substance for brevity, failing to provide actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of 3 parameters and no output schema, the description is completely inadequate. It does not help the agent invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, and the description adds no meaning to parameters q, top, or limit. The agent must guess their purpose.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Alias of sch.search' does not explain what the tool does; it is a tautology that relies on the agent knowing sch.search's purpose. Without that, the agent cannot understand the tool's function.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool vs alternatives like sch.search, web.search, or wiki.search. The description provides no context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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