Skip to main content
Glama

Compile a brief

compile_audience
Read-onlyIdempotent

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.

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": {
      "brief": "<brief>"
    },
    "name": "compile_audience"
  }
}

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
chipsYes
audienceYes
quantityYesA quantity named in the brief, such as 300, for quote_order limit.
readbackYesThe audience in one sentence, to confirm with the person.
questionsYes
unrecognisedYesWords of the brief that matched no filter, shown rather than guessed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / $defs / SinceFilter / properties / field / enum
      Previous value: -[
      -  "contact.last_validated_at",
      -  "email.last_verified_at",
      -  "signal.type",
      -  "signal.observed_at"
      -]New value: +[
      +  "contact.last_validated_at",
      +  "contact.last_confirmed_at",
      +  "contact.privacy_notice_last_sent_at",
      +  "contact.privacy_notice_first_sent_at",
      +  "email.last_verified_at",
      +  "signal.type",
      +  "signal.observed_at"
      +]
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safe-read profile (readOnly, idempotent, non-destructive), and the description goes well beyond that: it discloses cost ('Free and needs no account'), the legal basis (UK GDPR 6(1)(f)), and a non-obvious default that email audiences include corporate subscribers only under PECR, excluding sole traders and ordinary partnerships. It also discloses failure behaviour ('Words that match no filter come back in unrecognised, never guessed'), which is exactly the kind of trait annotations cannot carry.

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?

Purpose and the example brief are front-loaded, then usage ordering, then behavioral and compliance notes, which is a sensible sequence. The final sentence is dense and bundles lawful basis, PECR defaults and a toggle caveat, but each sentence carries distinct operational information rather than 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 two-parameter tool with an output schema, the description covers what the agent most needs: where it sits in the workflow, what comes back conceptually, how unmatched words are handled, cost/account requirements, and the compliance default that changes who lands in the audience. The dataset limitation is left to the schema, which documents it explicitly.

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

Parameters3/5

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

Schema description coverage is 100%, so both brief and dataset are already documented in the schema, including the dataset enum states (uk_contacts live; ie_contacts and global_contacts not yet served). The description repeats the brief example but adds no syntax or constraint detail for either parameter, and notably never mentions dataset selection, so the baseline of 3 applies.

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?

The description gives a concrete verb and resource (compiles a plain English brief into an audience definition) plus a worked example brief, and explicitly frames the output shape (readback, chips, questions). It also distinguishes itself from the sibling count_audience by stating 'pass the audience to count_audience next', so an agent can tell the two apart without opening either schema.

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?

It states explicit ordering ('Use it first for a request in words'), a procedural rule ('read the readback to the user and settle the questions before counting'), and a named handoff to count_audience. It also implies when the tool is the wrong fit by scoping it to requests expressed in words.

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.

Resources