Tools

Every MCP tool with access, arguments and examples.

An agent only sees the tools its connection allows. Read tools need read access and write tools need write access. Write tools can only change ads that the same connection created. Tool problems come back with isError set to true and a message the agent can act on.

All tools

ToolAccessWhat it does
get_accountReadCompany, connection access, limits and the portal link.
list_placementsReadPages that sell ads with formats, prices per day, duration discounts, booking rules and recent traffic.
check_availabilityReadBooked date ranges for one placement.
get_quoteReadPrice and availability for a plan.
list_adsReadAds on the account with status, dates, totals, views and clicks.
get_adReadOne ad with its creative, history, review reasons and payments.
get_overviewReadCounts by status, views and clicks for 30 days and total spend.
get_reportReadFull report for one ad or all ads.
upload_imageWriteUpload a PNG, JPEG or WebP sent as base64.
import_mediaWriteFetch an image, video or poster from a public https link.
create_upload_linkWriteOne time link to POST a file in the multipart field file.
create_adWriteCreate an ad that holds its dates while it waits for payment.
update_adWriteChange the plan and creative of an unpaid ad this connection created.
edit_ad_creativeWriteChange the creative while the ad is unpaid or in review.
checkout_adWritePayment link for an unpaid ad this connection created.
cancel_adWriteCancel an unpaid ad this connection created and free its dates.

get_account

Read Company, connection access, limits and the portal link.

No arguments.

curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_account", "arguments": {}}}' 

list_placements

Read Pages that sell ads with formats, prices per day, duration discounts, booking rules and recent traffic.

No arguments.

curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "list_placements", "arguments": {}}}' 

check_availability

Read Booked date ranges for one placement.

ArgumentTypeRequiredDescription
page_iduuidYesPlacement id from list_placements
fromdateYesFirst day to check
todateYesLast day to check
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "check_availability", "arguments": {"page_id": "7f6c1a52-0d1e-4c63-9a7e-2f1d3b8c9e10", "from": "2026-12-01", "to": "2026-12-31"}}}' 

get_quote

Read Price and availability for a plan.

ArgumentTypeRequiredDescription
page_iduuidYesPlacement id
formatstringYesimage or video
daysintegerYes1 to 365
start_datedateYesFrom tomorrow
couponstringNoCoupon code
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_quote", "arguments": {"page_id": "7f6c1a52-0d1e-4c63-9a7e-2f1d3b8c9e10", "format": "video", "days": 30, "start_date": "2026-12-01"}}}' 

list_ads

Read Ads on the account with status, dates, totals, views and clicks.

ArgumentTypeRequiredDescription
limitintegerNo1 to 50
offsetintegerNoFor paging
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "list_ads", "arguments": {"limit": 10}}}' 

get_ad

Read One ad with its creative, history, review reasons and payments.

ArgumentTypeRequiredDescription
ad_iduuidYesAd id
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_ad", "arguments": {"ad_id": "3d2b9f0e-6a1c-4e55-8f0b-1c2d3e4f5a6b"}}}' 

get_overview

Read Counts by status, views and clicks for 30 days and total spend.

No arguments.

curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_overview", "arguments": {}}}' 

get_report

Read Full report for one ad or all ads.

ArgumentTypeRequiredDescription
ad_iduuidNoLeave out for all ads
periodstringNoday, week or month
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "get_report", "arguments": {"ad_id": "3d2b9f0e-6a1c-4e55-8f0b-1c2d3e4f5a6b", "period": "day"}}}' 

upload_image

Write Upload a PNG, JPEG or WebP sent as base64.

ArgumentTypeRequiredDescription
kindstringYesimage or poster
content_typestringYesimage/png, image/jpeg or image/webp
data_base64stringYesFile bytes, up to 5 MB
filenamestringNoOriginal name
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "upload_image", "arguments": {"kind": "image", "content_type": "image/png", "data_base64": "iVBORw0KGgo..."}}}' 

import_media

Write Fetch an image, video or poster from a public https link.

ArgumentTypeRequiredDescription
kindstringYesimage, video or poster
urlstringYesPublic https link
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "import_media", "arguments": {"kind": "image", "url": "https://cdn.nova.example/banner.png"}}}' 

Write One time link to POST a file in the multipart field file.

ArgumentTypeRequiredDescription
kindstringYesimage, video or poster
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "create_upload_link", "arguments": {"kind": "video"}}}' 

create_ad

Write Create an ad that holds its dates while it waits for payment.

ArgumentTypeRequiredDescription
page_iduuidYesPlacement id
formatstringYesimage or video
daysintegerYes1 to 365
start_datedateYesFrom tomorrow
couponstringNoCoupon code
creativeobjectYesHeadline, link and media keys
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "create_ad", "arguments": {"page_id": "7f6c1a52-0d1e-4c63-9a7e-2f1d3b8c9e10", "format": "image", "days": 7, "start_date": "2026-12-01", "coupon": "WELCOME10", "creative": {"headline": "Record and cut in one app", "body": "Free for your first project.", "cta_label": "Try Nova", "destination_url": "https://nova.example/drefly", "image_key": "sponsor/users/4b1d.../9c1e.webp"}}}}' 

update_ad

Write Change the plan and creative of an unpaid ad this connection created.

ArgumentTypeRequiredDescription
ad_iduuidYesAd id
...YesThe same fields as create_ad

edit_ad_creative

Write Change the creative while the ad is unpaid or in review.

ArgumentTypeRequiredDescription
ad_iduuidYesAd id
creativeobjectYesHeadline, link and media keys
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "edit_ad_creative", "arguments": {"ad_id": "3d2b9f0e-6a1c-4e55-8f0b-1c2d3e4f5a6b", "creative": {"headline": "Cut videos faster", "destination_url": "https://nova.example/drefly"}}}}' 

checkout_ad

Write Payment link for an unpaid ad this connection created.

ArgumentTypeRequiredDescription
ad_iduuidYesAd id
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "checkout_ad", "arguments": {"ad_id": "3d2b9f0e-6a1c-4e55-8f0b-1c2d3e4f5a6b"}}}' 

cancel_ad

Write Cancel an unpaid ad this connection created and free its dates.

ArgumentTypeRequiredDescription
ad_iduuidYesAd id
curl https://ads.drefly.pro/api/ads/mcp \
  -H "Authorization: Bearer $DREFLY_ADS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "id": 1, "method": "tools/call", "params": {"name": "cancel_ad", "arguments": {"ad_id": "3d2b9f0e-6a1c-4e55-8f0b-1c2d3e4f5a6b"}}}' 

Next steps

Was this page helpful?