Skip to main content
Glama

wiki_get

Retrieve Wikipedia articles by specifying a title and optional language. Access structured encyclopedia content for research or information needs.

Instructions

Alias of wiki.get

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
langNo

Implementation Reference

  • The core handler function `wikiGet` that fetches a Wikipedia page summary via the REST API and returns title, url, abstract, source, and updatedAt.
    export async function wikiGet(title: string, lang = 'vi') {
      const url = `https://${lang}.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(title)}`;
      const res = await fetchWithLimits(url, 8000, 1024*1024);
      if (!res.body) return null;
      const data = JSON.parse(res.body.toString('utf-8'));
      return {
        title: data.title,
        url: data.content_urls?.desktop?.page || data.canonical || '',
        abstract: data.extract || '',
        source: 'wikipedia',
        updatedAt: data.timestamp || new Date().toISOString()
      };
    }
  • Input schema definition `wikiGetShape` with `title` (required string) and `lang` (optional string).
    const wikiGetShape = { title: z.string(), lang: z.string().optional() };
  • src/server.ts:211-224 (registration)
    Registration of the 'wiki.get' tool and its alias 'wiki_get' via server.tool(). Both call the same `wikiGet` handler.
    server.tool('wiki.get', 'Wikipedia summary by title.',
      wikiGetShape, OPEN,
      async ({ title, lang }) => {
        const res = await wikiGet(title, lang || 'vi');
        return { content: [{ type: 'text', text: JSON.stringify(res) }] };
      }
    );
    server.tool('wiki_get', 'Alias of wiki.get',
      wikiGetShape, OPEN,
      async ({ title, lang }) => {
        const res = await wikiGet(title, lang || 'vi');
        return { content: [{ type: 'text', text: JSON.stringify(res) }] };
      }
    );
  • The `fetchWithLimits` utility function used by `wikiGet` to make HTTP requests with size/timeout limits and DNS rebinding protection.
    import { request } from 'undici';
Behavior2/5

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

The description adds no behavioral context beyond the annotation 'openWorldHint: true'. It does not disclose side effects, authentication needs, or other traits.

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

Conciseness2/5

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

While short, the description is under-specification rather than conciseness. It lacks essential information, making it insufficient for effective tool selection.

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?

Without an output schema or any details about return values, the description is completely inadequate. The tool's behavior is undocumented, leaving the agent blind.

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?

Both parameters (title and lang) have no descriptions in the schema, and the description offers no explanation of their meaning or usage. The agent cannot infer their purpose.

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 states 'Alias of wiki.get', which only indicates it is an alias without defining the tool's actual function. It does not specify what action is performed or what resource is involved, making it vague.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like wiki.get or wiki.search. The description lacks context for appropriate usage.

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