Skip to main content
Glama

get-category-notes

Retrieve articles from a specific category on note.com with options to sort by newest or trending content and navigate through pages.

Instructions

カテゴリーに含まれる記事一覧を取得する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
categoryYesカテゴリー名(例: tech)
pageNoページ番号
sortNoソート方法(new: 新着順, trend: 人気順)new

Implementation Reference

  • Handler function that fetches notes for a given category from the note.com API, formats the notes with id, title, excerpt, user info, publish date, likes, and URL, then returns a success response or handles errors.
    async ({ category, page, sort }) => { try { const data = await noteApiRequest(`/v1/categories/${category}?note_intro_only=true&sort=${sort}&page=${page}`); let formattedNotes: any[] = []; if (data.data && data.data.notes && Array.isArray(data.data.notes)) { formattedNotes = data.data.notes.map((note: any) => ({ id: note.id || "", title: note.name || "", excerpt: note.body ? (note.body.length > 100 ? note.body.substring(0, 100) + '...' : note.body) : '本文なし', user: { nickname: note.user?.nickname || "", urlname: note.user?.urlname || "" }, publishedAt: note.publishAt || '日付不明', likesCount: note.likeCount || 0, url: `https://note.com/${note.user?.urlname || ''}/n/${note.key || ''}` })); } return createSuccessResponse({ category, page, notes: formattedNotes }); } catch (error) { return handleApiError(error, "カテゴリー記事取得"); } }
  • Zod input schema for the get-category-notes tool defining parameters: category (string), page (number default 1), sort (enum ["new","trend"] default "new").
    { category: z.string().describe("カテゴリー名(例: tech)"), page: z.number().default(1).describe("ページ番号"), sort: z.enum(["new", "trend"]).default("new").describe("ソート方法(new: 新着順, trend: 人気順)"), },
  • Registration of the get-category-notes tool via server.tool() including name, Japanese description, input schema, and inline handler function.
    server.tool( "get-category-notes", "カテゴリーに含まれる記事一覧を取得する", { category: z.string().describe("カテゴリー名(例: tech)"), page: z.number().default(1).describe("ページ番号"), sort: z.enum(["new", "trend"]).default("new").describe("ソート方法(new: 新着順, trend: 人気順)"), }, async ({ category, page, sort }) => { try { const data = await noteApiRequest(`/v1/categories/${category}?note_intro_only=true&sort=${sort}&page=${page}`); let formattedNotes: any[] = []; if (data.data && data.data.notes && Array.isArray(data.data.notes)) { formattedNotes = data.data.notes.map((note: any) => ({ id: note.id || "", title: note.name || "", excerpt: note.body ? (note.body.length > 100 ? note.body.substring(0, 100) + '...' : note.body) : '本文なし', user: { nickname: note.user?.nickname || "", urlname: note.user?.urlname || "" }, publishedAt: note.publishAt || '日付不明', likesCount: note.likeCount || 0, url: `https://note.com/${note.user?.urlname || ''}/n/${note.key || ''}` })); } return createSuccessResponse({ category, page, notes: formattedNotes }); } catch (error) { return handleApiError(error, "カテゴリー記事取得"); } } );

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