Skip to main content
Glama

tiktok_get_post_details

Retrieve comprehensive details from any TikTok post using its video URL. Get creator info, hashtags, engagement metrics, creation date, and video duration.

Instructions

Get the details of a TikTok post.This is used for getting the details of a TikTok post.Supports TikTok video url as input.Returns the details of the video like - Description - Creator username - Hashtags - Number of likes, shares, comments, views and bookmarks - Date of creation - Duration of the video

Input Schema

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

Implementation Reference

  • The performGetPostDetails function executes the core logic for fetching TikTok post details from the TikNeuron API, formats and returns the result as a human-readable string with description, creator, hashtags, likes, shares, comments, views, bookmarks, created_at, and duration.
    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'}
        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`;
          } else {
            return 'No details available';
          }
    }
  • PostDetails interface defines the response shape for the tiktok_get_post_details tool, including fields like description, creator, hashtags, likes, shares, comments, views, bookmarks, created_at, and duration.
    interface PostDetails {
        success: boolean;
        details: {
            description: string;
            creator: string;
            hashtags: string[];
            likes: string;  // Note: These are strings, not numbers
            shares: string;
            comments: string;
            views: string;
            bookmarks: string;
            created_at: string;
            duration: number;
        };
    }
  • index.ts:56-79 (registration)
    GET_POST_DETAILS Tool object definition registers the tool with name 'tiktok_get_post_details', description, and input schema requiring a tiktok_url string.
    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 as input." +
            "Returns the details of the video like" +
            " - Description" +
            " - Creator username" +
            " - Hashtags" + 
            " - Number of likes, shares, comments, views and bookmarks" +
            " - Date of creation" +
            " - Duration of the video",
        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",
                },
            },
            required: ["tiktok_url"],
        },
    };
  • index.ts:249-250 (registration)
    The ListToolsRequestSchema handler includes GET_POST_DETAILS in the list of available tools, registering it for client discovery.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
        tools: [AVAILABLE_SUBTITLES, GET_SUBTITLE, GET_POST_DETAILS],
  • The CallToolRequestSchema case statement for 'tiktok_get_post_details' routes the request to performGetPostDetails, validates arguments with isGetPostDetailsArgs, and returns the result.
    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 the full burden. It correctly implies a read operation and lists outputs, but does not disclose potential side effects, authentication requirements, rate limits, or error handling (e.g., for private videos). The transparency is adequate but could be improved.

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 somewhat redundant: 'Get the details of a TikTok post.This is used for getting the details of a TikTok post.' It could be more concise by removing the repetition. The list of return fields is clear but unstructured. Overall, it is not excessively long but could be tighter.

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?

For a simple tool with one parameter and no output schema, the description covers the core purpose, input format, and key output fields. It lacks information about accessibility restrictions (public only) and error scenarios, but these are minor gaps. The description is largely sufficient.

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 already describes the 'tiktok_url' parameter with examples, and the tool description merely repeats 'Supports TikTok video url as input' without adding new constraints or formatting details. With 100% schema coverage, the description does not significantly enhance parameter understanding.

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 clearly states the tool's function: 'Get the details of a TikTok post.' It specifies the input (TikTok video URL) and lists the specific return fields (description, creator username, hashtags, counts, dates, duration). This differentiates it from sibling tools like tiktok_available_subtitles, which deal with subtitles.

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 only says 'Supports TikTok video url as input' but does not explicitly compare with sibling tools or state when to use this tool versus alternatives. While the sibling tools have different purposes (subtitles), the lack of explicit guidance reduces the score.

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

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