MCP Tools
The tools of the MCP server. Arguments are JSON, nested arguments are shown as parent[child]. Files are publicly accessible URLs, data URLs (data:image/png;base64,...) or Base64 strings; big files are uploaded with create_file_upload and passed as its file_url. Photos, logos and designs can also be objects with the file and its crop rectangle (height, width, x, y), in percents of the image.
- get_account
- list_payment_methods
- list_templates
- get_template
- preview_template
- create_file_upload
- create_campaign
- update_campaign
- get_campaign
- list_campaigns
- get_campaign_edit_url
- list_incomplete_addresses
- fix_incomplete_addresses
- exclude_incomplete_addresses
- send_campaign
- cancel_campaign
- clone_campaign
- delete_campaign
- get_qr_scans
get_account
Returns the signed in user: email and available credits (in cents).
Takes no arguments.
list_payment_methods
Lists the cards saved on the account, for `send_campaign`.
Takes no arguments.
list_templates
Lists the templates the user can mail with: sizes, prices (in cents per piece), photo slots and whether they are own design templates (artwork upload) or preset templates (filled from `template_data`). `production_specs` gives the artwork size, trim, safe zone and ink-free zone (in inches, from the top left of the artwork) and the official guide PDFs; follow them when making artwork for own design templates.
Takes no arguments.
get_template
Returns one template.
Arguments
The template ID or UID.
preview_template
Renders a preset template with the given content, without creating a campaign. Returns the HTML of the front and the back. Photos, the agent photo and the logo are URLs here.
Arguments
The template ID or UID.
The listing address, usually on the front.
The listing description, usually on the back.
A label, e.g. "Just Listed" or "Just Sold".
Rendered as text or as a QR code depending on the template.
In dollars.
Whole or half numbers, e.g. 2.5.
Whole or half numbers, e.g. 2.5.
One of square_feet, arces .
Annual maintenance cost in dollars.
Annual taxes in dollars.
Extra variables some templates render.
Formatted as (555) 555-5555 or 555-555-5555.
Formatted as (555) 555-5555 or 555-555-5555.
QR codes printed on top of the design. Scans are tracked, see `get_qr_scans`.
QR code overlays per side. Positions and sizes are in inches from the top-left corner. Letters only have a front.
The URL the QR code points to.
Side length in inches.
QR code overlays per side. Positions and sizes are in inches from the top-left corner. Letters only have a front.
The URL the QR code points to.
Side length in inches.
create_file_upload
For files too big to pass as a data URL or Base64 string (more than a few hundred kilobytes), when you can make HTTP requests or the user can run a command. Returns an upload valid for an hour: POST the file as multipart/form-data to `upload.url`, the `upload.fields` first and the file last as `file` (`curl` is the command, with <path> to replace). Then pass `file_url` wherever a file is taken, for a day. At most 25 MB.
Arguments
The file name with its extension, e.g. `front.pdf` or `recipients.csv`.
create_campaign
Creates a draft campaign. Nothing is required, an empty draft is created without parameters. Fill it in here or later with `update_campaign`. Returns the campaign with its `edit_url`. Thumbnails and the proof render in the background, fetch them with `get_campaign`.
Arguments
The campaign name.
The ID or UID of the template, see `list_templates`. Own design templates are picked from the size of the first design when left out.
`standard` is only available for templates with a standard price.
One of first_class, standard .
Own design templates only: the artwork, an image or a single page PDF sized to the mailpiece including bleed (see the `production_specs` of the template). The first is the front, the second the back. With only a front the back is left white. Letters take one design.
Preset templates only: the content rendered on the mailpiece.
The listing address, usually on the front.
The listing description, usually on the back.
A label, e.g. "Just Listed" or "Just Sold".
Rendered as text or as a QR code depending on the template.
In dollars.
Whole or half numbers, e.g. 2.5.
Whole or half numbers, e.g. 2.5.
One of square_feet, arces .
Annual maintenance cost in dollars.
Annual taxes in dollars.
Extra variables some templates render.
The listing photos; the template needs one for each of its `photo_aspect_ratios`.
Preset templates only: the agent shown on the mailpiece.
Formatted as (555) 555-5555 or 555-555-5555.
Formatted as (555) 555-5555 or 555-555-5555.
A file (URL, data URL or Base64 string), or an object with the file and its crop. Without a crop the image is cropped to the center.
The return address, `name` is usually the company name. Required before sending.
A file (URL, data URL or Base64 string), or an object with the file and its crop. Without a crop the image is cropped to the center.
`map` mails the homes nearest to an address, `own_list` mails a list of recipients.
One of map, own_list .
With `targeting_method: map`.
How many homes to mail.
The homes nearest to this point are mailed.
Geocoded when no coordinates are given.
[latitude, longitude]
One of all, single_family, multi_family .
Last sale price in dollars.
Year of the last sale.
With `targeting_method: own_list`, instead of `csv`. Replaces the current recipients.
The name, e.g. "Current Resident".
With `targeting_method: own_list`, instead of `recipients`: a CSV with the columns Name,Address,City,State,Zip (URL, data URL or Base64). Replaces the current recipients. Rows missing a field are set aside, see `list_incomplete_addresses`.
Mail one extra piece to the sender.
Whether the copy goes to the sender address (default) or to `copy_address`.
Where the copy goes when `send_copy_to_company_address` is false.
QR codes printed on top of the design. Scans are tracked, see `get_qr_scans`.
QR code overlays per side. Positions and sizes are in inches from the top-left corner. Letters only have a front.
The URL the QR code points to.
Side length in inches.
QR code overlays per side. Positions and sizes are in inches from the top-left corner. Letters only have a front.
The URL the QR code points to.
Side length in inches.
Where the receipt and the mailing updates are sent.
Your own key / value pairs, `list_campaigns` can filter by them.
Reject the call unless the campaign is complete up to this step: `template`, `content` (designs or template data, sender) or `targeting`.
One of template, content, targeting .
update_campaign
Updates a draft campaign. Only the given fields change.
Arguments
The campaign ID.
The campaign name.
The ID or UID of the template, see `list_templates`. Own design templates are picked from the size of the first design when left out.
`standard` is only available for templates with a standard price.
One of first_class, standard .
Own design templates only: the artwork, an image or a single page PDF sized to the mailpiece including bleed (see the `production_specs` of the template). The first is the front, the second the back. With only a front the back is left white. Letters take one design.
Preset templates only: the content rendered on the mailpiece.
The listing address, usually on the front.
The listing description, usually on the back.
A label, e.g. "Just Listed" or "Just Sold".
Rendered as text or as a QR code depending on the template.
In dollars.
Whole or half numbers, e.g. 2.5.
Whole or half numbers, e.g. 2.5.
One of square_feet, arces .
Annual maintenance cost in dollars.
Annual taxes in dollars.
Extra variables some templates render.
The listing photos; the template needs one for each of its `photo_aspect_ratios`.
Preset templates only: the agent shown on the mailpiece.
Formatted as (555) 555-5555 or 555-555-5555.
Formatted as (555) 555-5555 or 555-555-5555.
A file (URL, data URL or Base64 string), or an object with the file and its crop. Without a crop the image is cropped to the center.
The return address, `name` is usually the company name. Required before sending.
A file (URL, data URL or Base64 string), or an object with the file and its crop. Without a crop the image is cropped to the center.
`map` mails the homes nearest to an address, `own_list` mails a list of recipients.
One of map, own_list .
With `targeting_method: map`.
How many homes to mail.
The homes nearest to this point are mailed.
Geocoded when no coordinates are given.
[latitude, longitude]
One of all, single_family, multi_family .
Last sale price in dollars.
Year of the last sale.
With `targeting_method: own_list`, instead of `csv`. Replaces the current recipients.
The name, e.g. "Current Resident".
With `targeting_method: own_list`, instead of `recipients`: a CSV with the columns Name,Address,City,State,Zip (URL, data URL or Base64). Replaces the current recipients. Rows missing a field are set aside, see `list_incomplete_addresses`.
Mail one extra piece to the sender.
Whether the copy goes to the sender address (default) or to `copy_address`.
Where the copy goes when `send_copy_to_company_address` is false.
QR codes printed on top of the design. Scans are tracked, see `get_qr_scans`.
QR code overlays per side. Positions and sizes are in inches from the top-left corner. Letters only have a front.
The URL the QR code points to.
Side length in inches.
QR code overlays per side. Positions and sizes are in inches from the top-left corner. Letters only have a front.
The URL the QR code points to.
Side length in inches.
Where the receipt and the mailing updates are sent.
Your own key / value pairs, `list_campaigns` can filter by them.
Reject the call unless the campaign is complete up to this step: `template`, `content` (designs or template data, sender) or `targeting`.
One of template, content, targeting .
get_campaign
Returns a campaign: its content, targeting, `recipient_count`, `price` (in cents), status, thumbnails, proof and the steps it has completed.
Arguments
The campaign ID.
list_campaigns
Lists the campaigns, newest first.
Arguments
Matches the name or the address.
One of all, draft, sent .
One of all, map, recipients .
One of all, own_design, preset .
Your own key / value pairs, `list_campaigns` can filter by them.
get_campaign_edit_url
Returns a link that signs the user in and opens the campaign in the RealMailers editor, for whatever is easier done by hand (cropping, the map, paying with a new card). The link expires after 30 minutes, get a new one each time.
Arguments
The campaign ID.
The step to open. When the campaign cannot be there yet, the furthest step it can be at opens.
One of template, content, user, company, targets, payment .
list_incomplete_addresses
Own list campaigns: the next batch of CSV rows set aside for missing a field, with `total`. They are not mailed until fixed.
Arguments
The campaign ID.
fix_incomplete_addresses
Completes rows from `list_incomplete_addresses`. Rows with every field are added to the recipients, the others stay set aside. Returns the next batch and `fixed_count`.
Arguments
The campaign ID.
The row ID.
exclude_incomplete_addresses
Leaves rows from `list_incomplete_addresses` out of the mailing.
Arguments
The campaign ID.
The row IDs.
Exclude every incomplete row.
send_campaign
Pays for and schedules a complete draft campaign. This spends money: confirm the `price` from `get_campaign` with the user first. Monthly invoiced accounts are billed on their invoice. Others pay with credits and / or a saved card: when `get_account` shows credits, offer them to the user and pass their choice as `apply_credits`. When neither covers the price, or the card needs the user to confirm it, nothing is charged and a `payment_url` is returned for the user to pay in the browser.
Arguments
The campaign ID.
A saved card from `list_payment_methods`.
Pay with the available credits first. Defaults to true.
ISO-8601. When the mailpieces go to print, at least 15 minutes and less than 90 days from now. The campaign can be cancelled until then. Defaults to the cancellation window.
Where the receipt is sent.
cancel_campaign
Cancels a sent campaign which has not gone to print yet and refunds it.
Arguments
The campaign ID.
clone_campaign
Copies a campaign, sent or not, into a new draft.
Arguments
The campaign ID.
delete_campaign
Deletes a draft campaign.
Arguments
The campaign ID.
get_qr_scans
Lists the scans of the campaign QR codes.
Arguments
The campaign ID.
curl -X POST https://www.realmailers.com/mcp \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'