Skip to main content
Glama

wiki_search

Search Wikipedia articles to retrieve information on specific topics using a query parameter, supporting multiple languages for comprehensive research.

Instructions

Alias of wiki.search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYes
langNo

Implementation Reference

  • Core implementation of wikiSearch function that queries Wikipedia's REST API for title search results.
    export async function wikiSearch(q: string, lang = 'vi', top = 5) {
      const url = `https://${lang}.wikipedia.org/w/rest.php/v1/search/title?q=${encodeURIComponent(q)}&limit=${top}`;
      const res = await fetchWithLimits(url, 8000, 1024*1024);
      if (!res.body) return [];
      const data = JSON.parse(res.body.toString('utf-8'));
      return (data.pages || []).map((p: any) => ({
        title: p.title,
        url: `https://${lang}.wikipedia.org/wiki/${encodeURIComponent(p.key)}`,
        snippet: p.description || '',
        source: 'wikipedia'
      }));
    }
  • src/server.ts:201-207 (registration)
    Registration of the 'wiki_search' tool in the MCP server, which wraps the wikiSearch handler.
    server.tool('wiki_search', 'Alias of wiki.search',
      wikiSearchShape, OPEN,
      async ({ q, lang }) => {
        const res = await wikiSearch(q, lang || 'vi');
        return { content: [{ type: 'text', text: JSON.stringify(res) }] };
      }
    );
  • Zod schema defining input parameters for wiki_search tool (q required, lang optional).
    const wikiSearchShape = { q: z.string(), lang: z.string().optional() };
  • src/server.ts:194-200 (registration)
    Primary registration of 'wiki.search' tool, of which wiki_search is an alias.
    server.tool('wiki.search', 'Wikipedia title search (public API).',
      wikiSearchShape, OPEN,
      async ({ q, lang }) => {
        const res = await wikiSearch(q, lang || 'vi');
        return { content: [{ type: 'text', text: JSON.stringify(res) }] };
      }
    );
Behavior3/5

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

The description adds minimal behavioral context beyond the openWorldHint annotation. While the annotation indicates this tool can return unpredictable results, the description doesn't elaborate on what 'wiki.search' actually does behaviorally - whether it searches Wikipedia, a specific wiki, returns structured data, etc. However, it doesn't contradict the annotation, so it gets a baseline score for not being misleading.

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

Conciseness5/5

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

The description is extremely concise at just three words. While it's under-specified in terms of content, it's perfectly efficient in form - every word serves the purpose of identifying this as an alias. There's no wasted verbiage or unnecessary elaboration.

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

Completeness2/5

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

For a search tool with 2 parameters (one required), no output schema, and minimal annotations, the description is inadequate. It doesn't explain what the tool searches, what it returns, or how parameters affect results. The agent would need to infer everything from the tool name and sibling tools, making this description incomplete for practical use.

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

Parameters2/5

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

With 0% schema description coverage for both parameters (q and lang), the description provides no parameter semantics whatsoever. It doesn't explain what 'q' represents (presumably a search query) or what 'lang' controls (presumably language). The description fails to compensate for the complete lack of schema documentation, leaving parameters completely unexplained.

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

Purpose2/5

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

The description 'Alias of wiki.search' is a tautology that restates the tool name without explaining what the tool actually does. It doesn't specify the verb (search) or resource (wiki content) in a meaningful way, nor does it distinguish this tool from its sibling 'wiki.search' which appears to be the same functionality. The user must already know what 'wiki.search' does to understand this tool.

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?

The description provides no guidance on when to use this tool versus alternatives. There's no mention of when this alias should be used instead of the original 'wiki.search' tool, nor does it explain its relationship to other search tools like 'sch.search' or 'web.search'. The agent receives no usage context whatsoever.

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