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()}`); }

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