Skip to main content
Glama

tiktok_get_post_details

Retrieve detailed information from any TikTok video using its URL or ID. Get description, creator username, hashtags, likes, shares, comments, views, bookmarks, creation date, duration, and available subtitles with language and source.

Instructions

Get the details of a TikTok post.This is used for getting the details of a TikTok post.Supports TikTok video url (or video ID) as input.Returns the details of the video like - Description - Video ID - Creator username - Hashtags - Number of likes, shares, comments, views and bookmarks - Date of creation - Duration of the video - Available subtitles with language and source information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tiktok_urlYesTikTok video URL, e.g., https://www.tiktok.com/@username/video/1234567890 or https://vm.tiktok.com/1234567890, or just the video ID like 7409731702890827041

Implementation Reference

  • Type definition for the PostDetails interface returned by the API, containing all TikTok post detail fields (description, video_id, creator, hashtags, engagement metrics, creation date, duration, and available subtitles).
    interface PostDetails {
        success: boolean;
        details: {
            description: string;
            video_id: string;
            creator: string;
            hashtags: string[];
            likes: string;
            shares: string;
            comments: string;
            views: string;
            bookmarks: string;
            created_at: string;
            duration: number;
            available_subtitles: Array<{
                language?: string;
                source?: string;
            }>;
        };
    }
  • Type guard that validates the input arguments for tiktok_get_post_details tool - checks that args is an object containing a string 'tiktok_url'.
    function isGetPostDetailsArgs(args: unknown): args is { tiktok_url: string } {
        return (
            typeof args === "object" &&
            args !== null &&
            "tiktok_url" in args &&
            typeof (args as { tiktok_url: string }).tiktok_url === "string"
        );
    }
  • Core handler function that calls the TikNeuron API (https://tikneuron.com/api/mcp/post-detail) with the tiktok_url, formats the response into a human-readable string with all post details.
    async function performGetPostDetails(tiktok_url: string) {
        const url = new URL('https://tikneuron.com/api/mcp/post-detail');
        url.searchParams.set('tiktok_url', tiktok_url);
    
        const response = await fetch(url, {
            headers: {
                'Accept': 'application/json',
                'Accept-Encoding': 'gzip',
                'MCP-API-KEY': TIKNEURON_MCP_API_KEY,
            }
        });
    
        if (!response.ok) {
            throw new Error(`TikNeuron API error: ${response.status} ${response.statusText}\n${await response.text()}`);
        }
    
        const data = await response.json() as PostDetails;
    
        if (data.details) {
            const details = data.details;
            return `Description: ${details.description || 'N/A'}
        Video ID: ${details.video_id || 'N/A'}
        Creator: ${details.creator || 'N/A'}
        Hashtags: ${Array.isArray(details.hashtags) ? details.hashtags.join(', ') : 'N/A'}
        Likes: ${details.likes || '0'}
        Shares: ${details.shares || '0'}
        Comments: ${details.comments || '0'}
        Views: ${details.views || '0'}
        Bookmarks: ${details.bookmarks || '0'}
        Created at: ${details.created_at || 'N/A'}
        Duration: ${details.duration || 0} seconds
        Available subtitles: ${details.available_subtitles?.map(sub => `${sub.language || 'Unknown'} (${sub.source || 'Unknown source'})`).join(', ') || 'None'}`;
          } else {
            return 'No details available';
          }
    }
  • index.ts:36-61 (registration)
    Tool registration definition for tiktok_get_post_details - declares the tool name, description, and input schema (requires tiktok_url string). Listed in the tools array at line 319.
    const GET_POST_DETAILS: Tool = {
        name: "tiktok_get_post_details",
        description:
            "Get the details of a TikTok post." +
            "This is used for getting the details of a TikTok post." +
            "Supports TikTok video url (or video ID) as input." +
            "Returns the details of the video like" +
            " - Description" +
            " - Video ID" +
            " - Creator username" +
            " - Hashtags" + 
            " - Number of likes, shares, comments, views and bookmarks" +
            " - Date of creation" +
            " - Duration of the video" +
            " - Available subtitles with language and source information",
        inputSchema: {
            type: "object",
            properties: {
                tiktok_url: {
                    type: "string",
                    description: "TikTok video URL, e.g., https://www.tiktok.com/@username/video/1234567890 or https://vm.tiktok.com/1234567890, or just the video ID like 7409731702890827041",
                },
            },
            required: ["tiktok_url"],
        },
    };
  • index.ts:344-355 (registration)
    Request handler case that routes 'tiktok_get_post_details' tool calls to performGetPostDetails, validating arguments with isGetPostDetailsArgs type guard.
    case "tiktok_get_post_details": {
        if (!isGetPostDetailsArgs(args)) {
            throw new Error("Invalid arguments for tiktok_get_post_details");
        }
        const { tiktok_url } = args;
    
        const results = await performGetPostDetails(tiktok_url);
        return {
            content: [{ type: "text", text: results }],
            isError: false,
        };
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It lists many return fields (likes, shares, comments, etc.), which is helpful, but does not disclose authentication, rate limits, or potential errors.

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

Conciseness3/5

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

The description is moderately concise but has redundancy (first two sentences say similar things). It lists return fields in a bullet-like manner, which aids readability.

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

Completeness3/5

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

Given the tool has one parameter and no output schema, the description adequately covers input and output fields. However, it lacks context on error handling, authentication, or pagination if applicable.

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 schema already describes the parameter in detail, including URL formats and video ID example. The description adds minimal extra value; it mentions 'supports TikTok video url (or video ID)' which matches the schema.

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 it gets post details and lists specific returned fields, distinguishing it from sibling tools like tiktok_get_subtitle and tiktok_search. However, the first two sentences are redundant.

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?

It implies use when post details are needed and specifies input formats (URL or video ID), but does not provide explicit when-to-use or when-not-to-use guidance compared to alternatives.

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/Seym0n/tiktok-mcp'

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