Skip to main content
Glama

campaigns_facets

Returns the distinct values of one campaign column with their counts, ordered by count descending — the data behind the value checklist in the campaign list's column menus.

Filterable columns: name, is_active, pinned, priority, add_limit, sequence_name, segment_name, created_at, updated_at. The row counters and signal verdicts are computed per row and are not offered.

Pass the other columns' active qf entries to get counts that match what is on screen; any entry for field itself is ignored.

Method: GET /api/v1/workspaces/{workspace_sqid}/campaigns/facets/

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": {
      "field": "<field>"
    },
    "name": "campaigns_facets"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoOnly return values containing this substring.
fieldYesColumn to facet on.
limitNoMax distinct values (default 50, max 200).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does reasonably well: it discloses ordering semantics, the read-only GET endpoint, the exclusion of row counters and signal verdicts, and the subtle behavior that `field`'s own filter is dropped. It does not cover edge cases such as what happens for a non-filterable field or whether an empty result is returned versus an error.

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?

Front-loaded with the core behavior, then a compact column allow-list, then the filter-matching note and endpoint. Little waste, though the `qf` sentence is cryptic without explaining where that parameter comes from.

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?

No output schema and no annotations, so the description must describe returns and behavior, and it does: distinct values plus counts, descending order, and what is excluded. A few gaps remain (error behavior for unsupported fields, the unexplained `qf` reference), but an agent can call this correctly from what is provided.

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 coverage is 100%, so baseline is 3. The description adds genuine value by enumerating the filterable columns for `field` (no enum exists in the schema), but it never explains `q` or `limit` beyond what the schema says, and it references `qf` entries that are not present in this tool's schema, which risks confusing an agent about what to pass.

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?

States a specific verb and resource: returns distinct values of one campaign column with their counts, ordered by count descending. It anchors the output to a concrete UI artifact (the value checklist in the campaign list's column menus), which distinguishes it from the row-returning siblings like campaigns_list and from other facets tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real calling context: pass the other columns' active filters so counts match what is on screen, and notes that a filter entry for `field` itself is ignored. It also bounds scope by saying row counters and signal verdicts are not offered. It stops short of naming when to prefer campaigns_list or another facets sibling, so no explicit alternative routing.

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.