Skip to main content
Glama
olamide-olaniyan

SociaVault MCP Server

get_tiktok_videos

Retrieve TikTok videos from a specific user by providing their username. This tool accesses video content through the SociaVault MCP Server for social media data queries.

Instructions

Get TikTok videos from a user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
handleYesTikTok username

Implementation Reference

  • Handler for the get_tiktok_videos tool: fetches videos from Sociavault API endpoint `/tiktok/videos` using the provided handle, extracts data with `extractTikTokVideos`, and returns JSON-formatted response.
    if (name === "get_tiktok_videos") {
      const { handle } = args as { handle: string };
      const response = await axios.get(`${BASE_URL}/tiktok/videos`, {
        headers: { "X-API-Key": API_KEY },
        params: { handle },
      });
      const extracted = extractTikTokVideos(response.data, 10);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              { handle, videos: extracted, total_returned: extracted.length },
              null,
              2
            ),
          },
        ],
      };
    }
  • src/index.ts:267-277 (registration)
    Tool registration entry for get_tiktok_videos, including name, description, and input schema requiring a 'handle' parameter.
    {
      name: "get_tiktok_videos",
      description: "Get TikTok videos from a user",
      inputSchema: {
        type: "object",
        properties: {
          handle: { type: "string", description: "TikTok username" },
        },
        required: ["handle"],
      },
    },
  • Helper function that parses TikTok API response data to extract up to 10 videos, normalizing fields like id, description, stats, and cover image.
    function extractTikTokVideos(data: any, limit = 10) {
      const videos =
        data?.data?.itemList ||
        data?.itemList ||
        data?.data?.videos ||
        data?.videos ||
        [];
      return videos.slice(0, limit).map((video: any) => {
        const stats = video.statistics || video.stats || {};
        return {
          id: video.id || video.aweme_id,
          description: video.desc || video.description || "",
          likes: stats.like_count || stats.digg_count || 0,
          comments: stats.comment_count || 0,
          shares: stats.share_count || 0,
          views: stats.play_count || stats.view_count || 0,
          timestamp: video.create_time || video.timestamp,
          duration: video.duration,
          cover: video.cover || video.video?.cover || video.cover_url,
        };
      });
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action but doesn't describe traits like whether this is a read-only operation, rate limits, authentication needs, or what the output format might be. This leaves significant gaps for an agent to understand how to invoke it correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It is appropriately sized and front-loaded, clearly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like safety, performance, or return values, which are crucial for an agent to use this tool effectively in a social media context with potential complexities.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'handle' documented as 'TikTok username'. The description adds no additional meaning beyond this, so it meets the baseline of 3 where the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'TikTok videos from a user', making the purpose understandable. However, it doesn't distinguish this tool from its sibling 'get_tiktok_profile', which might retrieve user metadata instead of videos, leaving room for ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'get_tiktok_profile' or other social media tools. The description implies usage for TikTok videos but lacks context on prerequisites, limitations, or comparisons with siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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