Skip to main content
Glama
tokportal

tokportal-mcp

Official
by tokportal

tokportal_create_video_ad_code_request

Request a TikTok Spark Code or Instagram Partner Code for one finalized video. Use this to get an ad code after the video is live, with atomic debit and task creation.

Instructions

Request an ad code (TikTok Spark Code / Instagram Partner Code) for a finalized video. Requests an ad code (TikTok Spark Code or Instagram Partner Code) for one finalized video and debits 7 credits. The video must be finalized on TikTok or Instagram with a live post link. Active TokPortal Coverage and a routable active account manager are required. TokPortal uses the account's current active manager, then its still-active manager relationship, then eligible non-cancelled order history. Completed bundles remain eligible without a delivery-age limit; cancelled orders are never restored. Assignment, debit, and task creation are atomic. Only one open request per video is allowed. Poll the GET endpoint to retrieve the code once the manager submits it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesVideo ID.
bodyYesJSON request body.
idempotency_keyNoOptional Idempotency-Key header for safe retries.
Behavior5/5

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

The description adds rich behavioral context beyond sparse annotations: it discloses that 7 credits are debited, atomicity of assignment/debit/task creation, and the one-open-request-per-video constraint. No contradiction with annotations (readOnlyHint=false, destructiveHint=false are consistent with a mutation operation).

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?

Every sentence adds value: purpose, prerequisites, eligibility, atomicity, polling instruction. Well-structured and appropriately sized with no wasted words. Front-loaded with the main action.

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 3-parameter tool with no output schema, the description covers prerequisites, side effects, eligibility, and follow-up action. Minor gap: no mention of error handling when prerequisites fail, but overall quite complete.

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?

Schema coverage is 100%, so baseline is 3. The description adds minor practical context (note is to manager for campaign, platform defaults to video's platform) but does not significantly enhance beyond the schema descriptions. Adequate but not extra.

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 it requests an ad code for a finalized video, specifies the resource (TikTok Spark Code or Instagram Partner Code), and includes constraints like finalized video and platform requirements. It distinguishes from siblings like tokportal_get_video_ad_code_request and other video management tools.

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

Usage Guidelines4/5

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

The description explains prerequisites (active TokPortal Coverage, routable manager), eligibility rules (completed bundles eligible, cancelled never restored), and explicitly advises polling the GET endpoint for code retrieval. However, it does not explicitly list when NOT to use the tool or compare to alternatives beyond the GET endpoint.

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/tokportal/tokportal-python'

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