get_threads_profile
Retrieve Threads user profile information by providing a username handle to access social media data through the SociaVault MCP Server.
Instructions
Get Threads profile data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| handle | Yes | Threads username |
Implementation Reference
- src/index.ts:391-401 (handler)Executes the get_threads_profile tool by calling the Sociavault API for Threads profile and extracting data using the helper function.if (name === "get_threads_profile") { const { handle } = args as { handle: string }; const response = await axios.get(`${BASE_URL}/threads/profile`, { headers: { "X-API-Key": API_KEY }, params: { handle }, }); const extracted = extractThreadsProfile(response.data); return { content: [{ type: "text", text: JSON.stringify(extracted, null, 2) }], }; }
- src/index.ts:245-255 (registration)Registers the get_threads_profile tool with name, description, and input schema in the tools array.{ name: "get_threads_profile", description: "Get Threads profile data", inputSchema: { type: "object", properties: { handle: { type: "string", description: "Threads username" }, }, required: ["handle"], }, },
- src/index.ts:248-254 (schema)Input schema definition for the get_threads_profile tool, requiring a 'handle' string.inputSchema: { type: "object", properties: { handle: { type: "string", description: "Threads username" }, }, required: ["handle"], },
- src/index.ts:85-97 (helper)Helper function that extracts and formats Threads profile data from the API response.function extractThreadsProfile(data: any) { const user = data?.data?.user || data?.user || {}; return { username: user.username, name: user.full_name || user.name, biography: user.biography, followers: user.follower_count || 0, following: user.following_count || 0, threads: user.thread_count || 0, verified: user.is_verified, profile_pic_url: user.profile_pic_url, }; }