Skip to main content
Glama

get_tiktok_user_videos

Fetch recent videos from a TikTok user profile using authenticated browser cookies. Specify username and limit to retrieve video content programmatically.

Instructions

Fetch recent videos from a TikTok user profile. Uses Chrome cookies for authentication.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesTikTok username (with or without @)
limitNoMax videos to return (default 15)

Implementation Reference

  • Registration and implementation of the 'get_tiktok_user_videos' tool, which fetches TikTok user videos.
    server.tool(
      'get_tiktok_user_videos',
      'Fetch recent videos from a TikTok user profile. Uses Chrome cookies for authentication.',
      {
        username: z.string().describe('TikTok username (with or without @)'),
        limit: z.number().min(1).max(30).default(15).describe('Max videos to return (default 15)'),
      },
      async ({ username, limit }) => {
        const depErr = checkDeps();
        if (depErr) return errorResult(depErr);
    
        const handle = username.startsWith('@') ? username : `@${username}`;
        const url = `https://www.tiktok.com/${handle}`;
    
        try {
          const result = await fetchFeed(url, limit);
          const videos = (result.entries || []).map((e) => ({
            title: e.title,
            url: e.url,
            duration: e.duration,
            view_count: e.view_count,
            like_count: e.like_count,
            comment_count: e.comment_count,
            uploader: e.uploader,
          }));
          return textResult({ username: handle, count: videos.length, videos });
        } catch (err) {
          return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`);
        }
      }
    );
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It successfully reveals the authentication mechanism (Chrome cookies), but omits other behavioral traits like error handling when cookies are missing, rate limiting, whether the operation is read-only, or if it spawns browser windows.

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 consists of two efficient sentences with zero waste. The first sentence front-loads the core purpose, while the second provides essential authentication context. Every word earns its place.

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

Completeness4/5

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

Given the tool's simplicity (2 parameters, no output schema) and the presence of sibling alternatives, the description covers the essential functional scope and critical authentication dependency. It could be improved by briefly indicating the return value type (video metadata/list).

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 for both parameters (username format and limit constraints). Since the schema fully documents the parameters, the baseline score of 3 is appropriate; the description implies these parameters through the action statement but doesn't need to duplicate schema details.

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

Purpose5/5

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

The description provides a specific verb ('Fetch'), resource ('recent videos'), and scope ('from a TikTok user profile'). It clearly distinguishes from sibling tools like 'play_tiktok_user' (fetch vs. play) and YouTube-related tools (TikTok vs. YouTube channels).

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

Usage Guidelines3/5

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

The description mentions the authentication requirement ('Uses Chrome cookies'), which is a crucial prerequisite. However, it lacks explicit guidance on when to use this versus 'play_tiktok_user' or 'get_video_info', leaving the selection criteria implied rather than stated.

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/ronantakizawa/social-video-mcp'

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