get_profile
Retrieve LINE user profile details including display name, profile picture URL, status message, and language for LINE Official Account management.
Instructions
Get detailed profile information of a LINE user including display name, profile picture URL, status message and language.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| userId | No | The user ID to get a profile. Defaults to DESTINATION_USER_ID. |
Implementation Reference
- src/tools/getProfile.ts:29-47 (handler)The handler implementation for the "get_profile" tool.
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/tools/getProfile.ts:21-48 (registration)The registration of the "get_profile" tool within the McpServer.
register(server: McpServer) { const userIdSchema = z .string() .default(this.destinationId) .describe( "The user ID to get a profile. Defaults to DESTINATION_USER_ID.", ); 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}`); } }, ); }