Skip to main content
Glama

segments_facets

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

Filterable columns: name, description, priority, pinned. Lead and automation counts are per-row aggregates 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}/segments/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": "segments_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 supplied, the description carries the load and does well: it discloses result ordering (count descending), the supported column whitelist, what is deliberately not offered, and the underlying GET endpoint. It omits auth/permission requirements and any rate-limit or error behavior, which leaves a gap for a workspace-scoped read endpoint.

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?

The output shape is front-loaded in sentence one, followed by constraints and then the endpoint, so the agent can stop reading early. It loses a point for invoking the undefined term `qf` twice without explanation, spending text on a concept the caller cannot map to any parameter.

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?

For a three-parameter read tool with no output schema and no annotations, the description covers return shape, ordering, allowed inputs, and the HTTP method. The main shortfall is the unexplained `qf` reference, which is central to the guidance but undefined for an agent that only sees `q`, `field`, and `limit`.

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 `q`, `field`, and `limit` are already documented, and the description adds meaning for `field` via the column whitelist. However, it spends its parameter-level guidance on `qf` entries that do not appear anywhere in the input schema, which is more likely to confuse than clarify, and it adds nothing about `q` or `limit` beyond the schema.

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 first sentence states a specific verb and resource (returns distinct values of one segment column with counts) plus the ordering, and grounds it with a concrete analogy to the segment list's column menus. An agent can immediately tell this is an aggregation/facet endpoint rather than a record fetch.

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?

It clearly delimits the usable domain by naming the four filterable columns and explicitly excluding lead and automation counts, which prevents wasted calls. It does not name a sibling alternative (e.g. campaigns_facets or context_fields_facets) or state when another facet tool would be the right choice, so it stops short of full routing guidance.

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.