Skip to main content
Glama

search-magazines

Search for magazines on note.com using keywords to find relevant publications and articles for research or reading purposes.

Instructions

マガジンを検索する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes検索キーワード
sizeNo取得する件数(最大20)
startNo検索結果の開始位置

Implementation Reference

  • Full registration of the 'search-magazines' tool, including description, Zod input schema (query: string, size: number default 10, start: number default 0), and handler. The handler calls note.com /v3/searches API with context=magazine, extracts data using safeExtractData and commonExtractors.magazines, formats with formatMagazine, and returns paginated results with total count.
    server.tool( "search-magazines", "マガジンを検索する", { query: z.string().describe("検索キーワード"), size: z.number().default(10).describe("取得する件数(最大20)"), start: z.number().default(0).describe("検索結果の開始位置"), }, async ({ query, size, start }) => { try { const data = await noteApiRequest(`/v3/searches?context=magazine&q=${encodeURIComponent(query)}&size=${size}&start=${start}`); const magazinesArray = safeExtractData(data, commonExtractors.magazines); const totalCount = safeExtractTotal(data, magazinesArray.length); const formattedMagazines = magazinesArray.map((magazine: any) => formatMagazine(magazine)); return createSuccessResponse({ total: totalCount, magazines: formattedMagazines }); } catch (error) { return handleApiError(error, "マガジン検索"); } } );
  • The core handler function for 'search-magazines' tool that performs the search API call, processes the response, formats magazines, and handles errors.
    async ({ query, size, start }) => { try { const data = await noteApiRequest(`/v3/searches?context=magazine&q=${encodeURIComponent(query)}&size=${size}&start=${start}`); const magazinesArray = safeExtractData(data, commonExtractors.magazines); const totalCount = safeExtractTotal(data, magazinesArray.length); const formattedMagazines = magazinesArray.map((magazine: any) => formatMagazine(magazine)); return createSuccessResponse({ total: totalCount, magazines: formattedMagazines }); } catch (error) { return handleApiError(error, "マガジン検索"); } }
  • Zod schema defining input parameters for the search-magazines tool.
    { query: z.string().describe("検索キーワード"), size: z.number().default(10).describe("取得する件数(最大20)"), start: z.number().default(0).describe("検索結果の開始位置"), },
  • Intermediate registration call within registerAllTools that includes search tools like search-magazines.
    registerSearchTools(server);
  • Top-level call to register all tools, which chains to search-magazines registration.
    registerAllTools(server);

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/shimayuz/note-com-mcp'

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