Skip to main content
Glama
CJ Affiliate Link Resolver and MCP

CJ Affiliate Link Resolver and MCP

resolve_cj_link

Finds a joined CJ publisher tracking link for an exact HTTPS merchant page. Verifies advertiser relationships and deep linking, reporting when no eligible link is confirmed.

Instructions

Find a joined CJ publisher link for an exact HTTPS merchant page.

Supply the promotional property Website ID unless configured locally. A known CJ Link ID or Advertiser ID narrows the search. If result status is portal_required, no eligible link was confirmed and no URL should be presented as affiliate tracking.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "destination_url": "<destination_url>"
    },
    "name": "resolve_cj_link"
  }
}

Input Schema

NameRequiredDescriptionDefault
link_idNo
website_idNo
advertiser_idNo
advertiser_nameNo
destination_urlYes

Output Schema

NameRequiredDescriptionDefault
methodNo
reasonYes
statusYes
link_idNo
destinationYes
tracking_urlNo
advertiser_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It does disclose one important outcome contract: when status is portal_required, no eligible link was confirmed and no URL should be presented as affiliate tracking. However, it never states whether the call is read-only or may create a link association, what credentials or account context are required, or how other failure statuses should be handled.

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

Conciseness4/5

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

Four short sentences, front-loaded with the core action, then parameter hints, then the output-handling rule. The fragmentary style ('Supply the promotional property Website ID unless configured locally') reads as clipped in places but nothing is redundant.

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?

Given an output schema exists, return shape need not be described, and the one status name that does get explained (portal_required) is the one with a downstream safety consequence. The remaining gap is the read-versus-write question for a 5-parameter tool with zero annotation coverage, which the description should have closed.

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 description coverage is 0%, so the description is the only source of parameter meaning, and it does real work: destination_url must be an exact HTTPS merchant page, website_id is the promotional property (required unless locally configured), and link_id/advertiser_id are narrowing filters rather than requirements. Only advertiser_name goes unexplained, a minor gap against otherwise strong coverage.

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 states a specific verb and resource: 'Find a joined CJ publisher link' scoped to 'an exact HTTPS merchant page.' That is enough for an agent to know this is a lookup/resolution operation rather than a report or a builder; the only residual ambiguity is whether 'joined' implies any write-side linking, which the description never resolves.

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 gives conditional guidance for individual parameters ('Supply the promotional property Website ID unless configured locally', 'A known CJ Link ID or Advertiser ID narrows the search') and a post-call rule for the portal_required status. What it lacks is any statement of when to call this tool at all versus handling the URL another way, or what to do when the lookup fails for reasons other than portal_required.

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

Deploy Server

Other Tools