Skip to main content
Glama

get_profile

Retrieve detailed LINE user profile information including display name, profile picture URL, status message, and language settings to personalize interactions and messaging.

Instructions

Get detailed profile information of a LINE user including display name, profile picture URL, status message and language.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userIdNoThe user ID to get a profile. Defaults to DESTINATION_USER_ID.U1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p

Implementation Reference

  • The handler function that executes the get_profile tool logic: validates userId, fetches profile from LINE API, handles errors, and returns success or error response.
    async ({ userId }) => { if (!userId) { return createErrorResponse(NO_USER_ID_ERROR); } try { const response = await this.client.getProfile(userId); return createSuccessResponse(response); } catch (error) { return createErrorResponse(`Failed to get profile: ${error.message}`); } },
  • Zod schema for the input parameter 'userId' with default value and description.
    const userIdSchema = z .string() .default(this.destinationId) .describe( "The user ID to get a profile. Defaults to DESTINATION_USER_ID.", );
  • The server.tool call within the register method that registers the 'get_profile' tool with name, description, input schema, and handler.
    server.tool( "get_profile", "Get detailed profile information of a LINE user including display name, profile picture URL, status message and language.", { userId: userIdSchema, }, async ({ userId }) => { if (!userId) { return createErrorResponse(NO_USER_ID_ERROR); } try { const response = await this.client.getProfile(userId); return createSuccessResponse(response); } catch (error) { return createErrorResponse(`Failed to get profile: ${error.message}`); } }, );
  • src/index.ts:65-65 (registration)
    Instantiation of GetProfile tool with client and destinationId, and call to its register method on the MCP server.
    new GetProfile(messagingApiClient, destinationId).register(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/tndfame/mcp_management'

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