Skip to main content
Glama
olamide-olaniyan

SociaVault MCP Server

get_tiktok_profile

Retrieve TikTok profile data by username to access user information and metrics through the SociaVault MCP Server.

Instructions

Get TikTok profile data

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesTikTok username

Implementation Reference

  • Handler for the get_tiktok_profile tool: makes API call to Sociavault TikTok profile endpoint and extracts data using extractTikTokProfile helper.
    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)
    Registration of the get_tiktok_profile tool in the tools array, including name, description, and input schema.
    { name: "get_tiktok_profile", description: "Get TikTok profile data", inputSchema: { type: "object", properties: { handle: { type: "string", description: "TikTok username" }, }, required: ["handle"], }, },
  • Helper function to extract structured TikTok profile data from the API response.
    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, }; }

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