Skip to main content
Glama

context_fields_facets

Returns the distinct values of one column of the context field list itself — not of the lead values behind it — with their counts, ordered by count descending. This is the data behind the value checklist in the field list's column menus.

Filterable columns: key, description, field_type, use, order.

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}/context-fields/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": "context_fields_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.3/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose meaningful behavior: values are returned with counts ordered by count descending, the payload mirrors the column-menu value checklist, and self-referential filter entries are silently ignored. It omits permission requirements, error behavior, and whether results are paginated beyond the limit.

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-loads the key disambiguation in the first sentence and follows with the allowed columns and matching-count rule. The trailing 'Method: GET /api/...' line is minor filler but does not obscure the content.

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 simple three-parameter read tool with no output schema and no annotations, the description covers return shape, ordering, allowed facet columns, and filter interaction well enough to call correctly. Only permission/error and pagination details are absent.

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

Parameters4/5

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

Schema coverage is 100%, but the description still adds real constraints the schema lacks — it enumerates the allowed `field` values (key, description, field_type, use, order) and explains how the surrounding filter entries affect counts. The `qf` references are somewhat opaque since no such parameter exists in 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?

States a specific verb and resource: returns distinct values with counts for one column of the context field list itself, and explicitly distinguishes that from faceting on the lead values behind it. The sibling facets tools (e.g. workspaces_leads_facets) are implicitly separated by the '*context field list itself* — not of the lead values behind it' clause.

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 concrete usage context: pass other columns' active `qf` entries so counts match what is on screen, and notes that an entry for `field` itself is ignored. It explains the intended scenario well but never names an alternative tool or states an explicit when-not-to-use condition.

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.