Skip to main content
Glama

get-user

Retrieve user profile information from note.com by providing a username to access account details and member data.

Instructions

ユーザーの詳細情報を取得する

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesユーザー名(例: princess_11)

Implementation Reference

  • Executes the core logic of the 'get-user' tool: fetches user data from Note.com API endpoint `/v2/creators/${username}`, formats it with formatUser helper, wraps in success response or handles errors.
    async ({ username }) => { try { const data = await noteApiRequest(`/v2/creators/${username}`); const userData = data.data || {}; if (env.DEBUG) { console.error(`User API Response: ${JSON.stringify(data, null, 2)}`); } const formattedUser = formatUser(userData); return createSuccessResponse(formattedUser); } catch (error) { return handleApiError(error, "ユーザー情報取得"); } }
  • Zod input schema defining the 'username' parameter as a required string for the get-user tool.
    { username: z.string().describe("ユーザー名(例: princess_11)"), },
  • Registers the 'get-user' tool on the MCP server with name, description, input schema, and handler function.
    server.tool( "get-user", "ユーザーの詳細情報を取得する", { username: z.string().describe("ユーザー名(例: princess_11)"), }, async ({ username }) => { try { const data = await noteApiRequest(`/v2/creators/${username}`); const userData = data.data || {}; if (env.DEBUG) { console.error(`User API Response: ${JSON.stringify(data, null, 2)}`); } const formattedUser = formatUser(userData); return createSuccessResponse(formattedUser); } catch (error) { return handleApiError(error, "ユーザー情報取得"); } } );
  • Top-level registration call within tools/index.ts that invokes registerUserTools to add the get-user tool to the server.
    registerUserTools(server);
  • Imports formatUser helper used in the get-user handler to process raw API response into formatted user data.
    import { formatUser, formatNote } from "../utils/formatters.js";

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