Skip to main content
Glama

Link Page to Competitor

sonar_ad_spy_link
Idempotent

WRITE tool — confirm which Facebook page or TikTok account belongs to a competitor. Only call it after the user picked the candidate (the mapping is shared by every Sonar account). Accepts only candidates this account's own scans or searches returned in the last 2 days. Spends no lookup; then use sonar_ad_spy_refresh to fetch the ads. Requires an Indie or Agency plan (a trial counts) and an authorized Sonar account or an API key with the write scope.

Input Schema

NameRequiredDescriptionDefault
channelYes"meta" links a Facebook page, "tiktok" a TikTok account.
page_idNoChannel meta: `page_id` of a candidate from sonar_ad_spy_scan or sonar_ad_spy_search_pages.
user_idNoChannel tiktok: `user_id` of a candidate from sonar_ad_spy_scan.
account_idNoChannel tiktok: an account already linked elsewhere in this account (alternative to user_id).
advertiser_idNoChannel meta: a page this account already sees (alternative to page_id).
competitor_idYesSonar app id of a tracked competitor (an `app_id` from sonar_ad_spy_competitors), or its store id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.9/5.0
Behavior5/5

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

Annotations only declare write/idempotent/non-destructive; the description goes further by disclosing that the mapping is shared across every Sonar account (a global side effect the agent must not treat as private), that the call spends no lookup credit, and that it requires an Indie or Agency plan plus an authorized account or write-scoped API key. These are exactly the behavioral facts an agent cannot infer from structured data.

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?

Four tight sentences: the write framing and eligibility come first, then the preconditions, then cost and the follow-up call, then auth/plan requirements. Every sentence carries a distinct, actionable constraint with no filler.

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?

For a write tool with six parameters, no output schema, and only partial annotation coverage, the description supplies the two things annotations cannot: permission/plan prerequisites and the cross-account blast radius of the mapping. An agent has everything it needs to decide whether to call it and what to do afterwards.

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

Parameters4/5

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

Schema coverage is 100%, so the per-field channel/page_id/user_id/account_id/advertiser_id semantics are already documented. The description still adds real meaning by constraining which ids are acceptable (own scans or searches, within 2 days), which the schema does not express. It does not restate the meta-vs-tiktok parameter split, but that is thoroughly covered in the 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?

States a specific verb (confirm/link) and resource (a Facebook page or TikTok account to a competitor), and immediately frames it as a WRITE tool. It is clearly distinguished from its sibling sonar_ad_spy_unlink and from the read-side discovery tools (sonar_ad_spy_scan, sonar_ad_spy_search_pages) it depends on.

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?

Gives an explicit precondition ('Only call it after the user picked the candidate') and names the next step ('then use sonar_ad_spy_refresh to fetch the ads'), which routes the agent through the whole workflow. It also states the hard eligibility rule that only candidates returned by this account's own scans/searches in the last 2 days are accepted.

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.