Skip to main content
Glama

search_items

Search Qiita articles with a query or get recent articles to find technical content and documentation.

Instructions

Search Qiita articles. You can search with a query string or get recent articles without a query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNoSearch query (optional)
pageNoPage number (1-100, default: 1)
per_pageNoItems per page (1-100, default: 20)

Implementation Reference

  • Handles the execution of the 'search_items' tool in the MCP call handler by invoking qiitaClient.searchItems with input arguments and returning the result as formatted JSON text.
    case "search_items": {
      const result = await qiitaClient.searchItems(
        args?.query as string | undefined,
        args?.page as number | undefined,
        args?.per_page as number | undefined
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
  • Defines the input JSON schema for the 'search_items' tool, specifying optional query, page, and per_page parameters with validation.
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "Search query (optional)",
        },
        page: {
          type: "number",
          description: "Page number (1-100, default: 1)",
          minimum: 1,
          maximum: 100,
        },
        per_page: {
          type: "number",
          description: "Items per page (1-100, default: 20)",
          minimum: 1,
          maximum: 100,
        },
      },
    },
  • src/index.ts:126-151 (registration)
    Registers the 'search_items' tool in the tools array, including name, description, and input schema, used by the ListTools handler.
    {
      name: "search_items",
      description:
        "Search Qiita articles. You can search with a query string or get recent articles without a query.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "Search query (optional)",
          },
          page: {
            type: "number",
            description: "Page number (1-100, default: 1)",
            minimum: 1,
            maximum: 100,
          },
          per_page: {
            type: "number",
            description: "Items per page (1-100, default: 20)",
            minimum: 1,
            maximum: 100,
          },
        },
      },
    },
  • Core helper function in QiitaClient that constructs the API request parameters and fetches search results from Qiita's /items endpoint.
    async searchItems(
      query?: string,
      page: number = 1,
      perPage: number = 20
    ): Promise<any[]> {
      const params = new URLSearchParams({
        page: page.toString(),
        per_page: perPage.toString(),
      });
    
      if (query) {
        params.append("query", query);
      }
    
      return this.fetch(`/items?${params.toString()}`);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions the tool can 'search' or 'get recent articles', but doesn't disclose behavioral traits such as whether it's read-only, if it requires authentication, rate limits, pagination behavior beyond parameters, or what the return format looks like. This is a significant gap for a search tool with no annotation coverage.

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 a single, efficient sentence that front-loads the purpose and usage, with zero wasted words. It clearly communicates the core functionality without unnecessary details.

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?

Given the tool's complexity (search functionality with 3 parameters), no annotations, and no output schema, the description is incomplete. It lacks details on behavioral aspects like authentication needs, rate limits, return format, and error handling, which are crucial for an AI agent to use it correctly.

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?

The schema description coverage is 100%, so the schema already documents all parameters (query, page, per_page) with descriptions and constraints. The description adds no additional meaning beyond implying query is optional for getting recent articles, which is already covered in the schema. Baseline 3 is appropriate when the schema does the heavy lifting.

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

Purpose4/5

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

The description clearly states the verb ('search') and resource ('Qiita articles'), specifying it can search with a query or get recent articles without one. However, it doesn't explicitly differentiate from siblings like 'get_items_by_tag' or 'get_items_by_user', which are more specific search variants.

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?

The description implies usage by mentioning 'search with a query string or get recent articles without a query', which suggests when to use it (for general searches or recent articles). However, it doesn't provide explicit guidance on when to use this vs. alternatives like 'get_items_by_tag' for tag-based searches, leaving some ambiguity.

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/ningen/qiita-mcp-server'

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