Skip to main content
Glama
olamide-olaniyan

SociaVault MCP Server

get_tiktok_profile

Retrieve TikTok profile information by providing a username to access user data and profile details from the platform.

Instructions

Get TikTok profile data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesTikTok username

Implementation Reference

  • Handler implementation for the get_tiktok_profile tool. It extracts the 'handle' argument, makes an API request to the Sociavault TikTok profile endpoint, processes the response using the extractTikTokProfile helper, and returns the structured data as JSON.
    if (name === "get_tiktok_profile") { const { handle } = args as { handle: string }; const response = await axios.get(`${BASE_URL}/tiktok/profile`, { headers: { "X-API-Key": API_KEY }, params: { handle }, }); const extracted = extractTikTokProfile(response.data); return { content: [{ type: "text", text: JSON.stringify(extracted, null, 2) }], }; }
  • src/index.ts:223-233 (registration)
    Tool registration entry for get_tiktok_profile, including name, description, and input schema definition.
    { name: "get_tiktok_profile", description: "Get TikTok profile data", inputSchema: { type: "object", properties: { handle: { type: "string", description: "TikTok username" }, }, required: ["handle"], }, },
  • Helper function that extracts and structures essential TikTok profile information from the raw API response data.
    function extractTikTokProfile(data: any) { const user = data?.data?.userInfo?.user || data?.user || {}; const stats = data?.data?.userInfo?.stats || user.stats || {}; return { username: user.uniqueId || user.username, nickname: user.nickname, signature: user.signature, followers: stats.followerCount || 0, following: stats.followingCount || 0, likes: stats.heartCount || stats.heart || 0, videos: stats.videoCount || 0, verified: user.verified, avatar: user.avatarLarger || user.avatarMedium, }; }
  • Input schema definition for the get_tiktok_profile tool, specifying the required 'handle' parameter.
    inputSchema: { type: "object", properties: { handle: { type: "string", description: "TikTok username" }, }, required: ["handle"], },

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/olamide-olaniyan/sociavault-mcp'

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