Skip to main content
Glama

AdsAgent — TikTok Ads MCP

spark_ads_authorize_codes

Authorize 1..20 fresh TikTok Spark Ad authorization codes for one exact advertiser and return route-bound identity/item receipts. This tool performs the provider authorization immediately: call it only after the user explicitly supplies the codes and asks to authorize them. The server checkpoints each code before the provider call, stores only a tenant/advertiser-scoped fingerprint, executes serially, and never returns a raw authorization code.

REQUIRED: advertiser_id from assets_list_ad_accounts; auth_codes (1..20 strings); ad_names (the same length, in matching order). Each result carries request_index. Pass every status=ok row's identity_id, identity_type, tiktok_item_id, and spark_receipt unchanged to campaigns_quick_create or its batch variant, and set ad_params.ad_format from that row's supported_ad_formats.

SAFETY: never call for discovery and never automatically retry the whole request. If authorization_applied is true, or the row is outcome_uncertain, do not resubmit that code; use its support_ref for receipt reconciliation or call spark_ads_list_posts read-only. Retry only a row explicitly marked authorization_applied=false and retryable=true, after the stated backoff.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ad_namesYes
auth_codesYes
advertiser_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden. It discloses immediate provider authorization, per-code checkpointing, tenant/advertiser-scoped fingerprint storage, serial execution, and that raw codes are never returned. It also details safety rules on retries and error handling. No contradictions exist since annotations are absent.

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 dense but every sentence earns its place. It front-loads purpose, then requirements, then safety, with clear labeling. For a tool with this complexity and zero annotations, the length is justified; there is no filler or redundancy.

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

Completeness5/5

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

It covers prerequisites, parameter semantics, return value usage, retry policy, error handling, and alternatives. Without an output schema, it fully specifies what an agent needs to call it correctly and process results. Nothing critical is missing.

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

Parameters5/5

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

Schema coverage is 0%, so the description must compensate. It does: advertiser_id is sourced from assets_list_ad_accounts, auth_codes must be 1..20 fresh strings, ad_names must match length and order. It also explains how each result maps to downstream tools, adding far more than the bare schema.

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 opens with a specific verb (Authorize) and resource (TikTok Spark Ad authorization codes), scoped to 1..20 codes for one exact advertiser, and states the return type (route-bound identity/item receipts). This clearly distinguishes it from all sibling tools, none of which perform authorization, so there is no ambiguity.

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

Usage Guidelines5/5

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

It explicitly states when to call (only after user supplies codes and asks), and provides hard exclusions: never for discovery, never automatically retry the whole request. It names the alternative spark_ads_list_posts for read-only reconciliation and defines retry conditions per row. This is model guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources