Skip to main content
Glama
109naoki

minimal-mcp-server

by 109naoki

search-wikipedia

Search Japanese Wikipedia to retrieve article summaries using keywords. This tool provides concise information from Wikipedia's Japanese content for quick reference.

Instructions

日本語Wikipediaでキーワードを検索し、記事の要約を返すツール

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes検索キーワード(例: 東京タワー)

Implementation Reference

  • Registration and implementation of the 'search-wikipedia' tool, including input validation schema and fetch logic to Wikipedia API.
    server.registerTool(
      "search-wikipedia",
      {
        description: "日本語Wikipediaでキーワードを検索し、記事の要約を返すツール",
        inputSchema: {
          query: z.string().describe("検索キーワード(例: 東京タワー)"),
        },
      },
      async ({ query }) => {
        const url = `https://ja.wikipedia.org/api/rest_v1/page/summary/${encodeURIComponent(query)}`;
        const res = await fetch(url);
        if (!res.ok) {
          return {
            content: [
              {
                type: "text",
                text: `「${query}」に該当する記事が見つかりませんでした。`,
              },
            ],
          };
        }
        const data = await res.json();
        return {
          content: [
            {
              type: "text",
              text: `【${data.title}】\n${data.extract}\n\nURL: ${data.content_urls?.desktop?.page ?? "N/A"}`,
            },
          ],
        };
      },
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden and successfully discloses that it returns article summaries (not full content) and specifically searches Japanese Wikipedia. However, it lacks details on result limits, pagination, or behavior when no matches are found.

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?

Single sentence that is perfectly front-loaded with zero waste. It efficiently packs the language (Japanese), action (search), input (keyword), and output (summaries) into a compact description where every element provides value.

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

Completeness4/5

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

Given this is a simple single-parameter search tool without an output schema, the description adequately covers the essentials by specifying what is searched and what is returned. However, it could improve by clarifying whether multiple results or a single best match is returned.

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

Parameters3/5

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

Schema coverage is 100% with the 'query' parameter fully documented in the schema with an example. The description mentions 'キーワード' (keyword) which aligns with the parameter, but adds no additional syntactic or semantic details beyond the schema definition.

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

Purpose5/5

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

Description clearly states the specific action (検索/search), resource (日本語Wikipedia/Japanese Wikipedia), and output (記事の要約/article summaries). It distinctly differs from siblings 'echo' and 'get-current-time' by specifying Wikipedia search functionality.

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

Usage Guidelines3/5

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

While the description implies usage through its specific function (Wikipedia search), it provides no explicit guidance on when to select this tool versus alternatives, prerequisites, or conditions where it might not be suitable.

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/109naoki/minimal-mcp-server'

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