EmailmoversMyDataHub docs
Browse the docs

Reference / MCP tool reference

Reference

Compile a brief

compile_audience: Compiles a plain English brief, such as 300 finance directors at law firms in Manchester, into an audience definition with a one-sentence readback, editable chips and any questions to answer first.

Generated from the contractsView as Markdown

Compiles a plain English brief, such as 300 finance directors at law firms in Manchester, into an audience definition with a one-sentence readback, editable chips and any questions to answer first. Use it first for a request in words, read the readback to the user and settle the questions before counting. Words that match no filter come back in unrecognised, never guessed. Free and needs no account; pass the audience to count_audience next. Lawful basis is UK GDPR Article 6(1)(f) legitimate interests; email audiences include corporate subscribers only by default (PECR), so sole traders and ordinary partnerships are left out unless the toggle is changed.

PropertyValue
Tool namecompile_audience
Position in tools/list7 of 22
CostFree
ScopeNone. Works without an account.
AnnotationsreadOnlyHint true, destructiveHint false, idempotentHint true, openWorldHint false
KindRead only; idempotent, not destructive, closed world
REST equivalentPOST /v1/audiences/compile

Input

The schema sets additionalProperties to false, so a member that is not listed is refused.

MemberTypeRequiredDescription
briefstringyesA plain English brief, such as "300 finance directors at law firms in Manchester".
datasetenum: uk_contacts, ie_contacts, global_contactsnoThe dataset an audience draws from. uk_contacts is live; ie_contacts and global_contacts are listed but not yet served.

Example call

The params of a tools/call request:

{
  "name": "compile_audience",
  "arguments": {
    "brief": "300 finance directors at law firms in Manchester"
  }
}

Output

The result carries structuredContent that matches this schema, and one line of text that leads with the number.

MemberTypeAlways presentDescription
audienceAudienceyesWho you want, as filters grouped by entity (company., site., contact., email., phone., signal.). The server fills its defaults (active companies, named emails, corporate subscribers, the current dataset_version) and returns the effective definition with every count. See Audience.
readbackstringyesThe audience in one sentence, to confirm with the person.
chipsarray of Chipyes
chips[].labelstringyesWhat the chip reads, such as Within 20 miles of Leeds.
chips[].pointerstringyesJSON pointer to the filter inside audience.
chips[].from_briefstringyesThe words of the brief it came from.
questionsarray of BriefQuestionyes
questions[].idstringyes
questions[].textstringyes
questions[].optionsarray of objectyes
unrecognisedarray of stringyesWords of the brief that matched no filter, shown rather than guessed.
quantityinteger (0 or more) or nullyesA quantity named in the brief, such as 300, for quote_order limit.

Errors

A failed call returns isError true. The text content leads with the sentence a person acts on, then the whole problem as JSON, with code, detail, next_step and did_you_mean. A 401 and a step-up 403 are answered at HTTP level so the client can start authorisation. See Errors.