Skip to main content
Glama

get-likes

Retrieve the list of likes for a specific note.com article by providing its article ID. This tool helps you view engagement metrics and track user interactions with your published content.

Instructions

記事のスキ一覧を取得する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteIdYes記事ID

Implementation Reference

  • The core handler function for the 'get-likes' tool. It makes an API request to `/v3/notes/${noteId}/likes`, processes the likes data by mapping through `formatLike`, and returns a success response with the formatted likes list.
    async ({ noteId }) => { try { const data = await noteApiRequest(`/v3/notes/${noteId}/likes`); let formattedLikes: any[] = []; if (data.data && data.data.likes) { formattedLikes = data.data.likes.map(formatLike); } return createSuccessResponse({ likes: formattedLikes }); } catch (error) { return handleApiError(error, "スキ一覧取得"); } }
  • Zod input schema for the 'get-likes' tool, requiring a 'noteId' string parameter.
    { noteId: z.string().describe("記事ID"), },
  • The server.tool call that registers the 'get-likes' tool, including description, schema, and inline handler function.
    server.tool( "get-likes", "記事のスキ一覧を取得する", { noteId: z.string().describe("記事ID"), }, async ({ noteId }) => { try { const data = await noteApiRequest(`/v3/notes/${noteId}/likes`); let formattedLikes: any[] = []; if (data.data && data.data.likes) { formattedLikes = data.data.likes.map(formatLike); } return createSuccessResponse({ likes: formattedLikes }); } catch (error) { return handleApiError(error, "スキ一覧取得"); } } );
  • Higher-level registration call to registerNoteTools(server), which includes the get-likes tool among note-related tools.
    registerNoteTools(server);
  • Helper function formatLike used in the handler to format individual like objects into {id, user, createdAt}.
    export function formatLike(like: Like): FormattedLike { return { id: like.id || "", user: like.user?.nickname || "匿名ユーザー", createdAt: like.createdAt || "" }; }

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