Skip to main content
Glama

Tag Clients

tag_clients

Apply a tag to a whole selection of clients at once. Target the set with EITHER client_ids (an explicit list) OR the same selection filters as list_clients (tag, state, county/county_state, near_zip/near_client + radius_miles, has_email, has_phone, q). Name the tag with grouping_id (existing tag) or tag_name (created if new — e.g. 'Marked for mailing'). Returns how many were newly tagged. This is the modern 'mark for mailing'.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "tag_clients"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoSearch text; with multiple words, all must match.
tagNoA tag's grouping_id (from your tags / client selection).
stateNoUS state as a 2-letter code, e.g. MI.
countyNoA US county name (use with county_state).
near_zipNoA US ZIP code to search around (use with radius_miles).
tag_nameNo
has_emailNoIf true, only include records that have an email on file.
has_phoneNoIf true, only include records that have a phone on file.
client_idsNoA list of client ids (from search or list_clients).
grouping_idNo
near_clientNoA client id to search around geographically (use with radius_miles).
county_stateNoThe county's US state as a 2-letter code, e.g. MI.
radius_milesNoSearch radius in miles from the ZIP or client.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed11 schema fields changed
    • addedInput schema / properties / client_ids / description
      Added value: +"A list of client ids (from search or list_clients)."
    • addedInput schema / properties / county / description
      Added value: +"A US county name (use with county_state)."
    • addedInput schema / properties / county_state / description
      Added value: +"The county's US state as a 2-letter code, e.g. MI."
    • addedInput schema / properties / has_email / description
      Added value: +"If true, only include records that have an email on file."
    • addedInput schema / properties / has_phone / description
      Added value: +"If true, only include records that have a phone on file."
    • addedInput schema / properties / near_client / description
      Added value: +"A client id to search around geographically (use with radius_miles)."
    • addedInput schema / properties / near_zip / description
      Added value: +"A US ZIP code to search around (use with radius_miles)."
    • addedInput schema / properties / q / description
      Added value: +"Search text; with multiple words, all must match."
    • addedInput schema / properties / radius_miles / description
      Added value: +"Search radius in miles from the ZIP or client."
    • addedInput schema / properties / state / description
      Added value: +"US state as a 2-letter code, e.g. MI."
    • addedInput schema / properties / tag / description
      Added value: +"A tag's grouping_id (from your tags / client selection)."
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

Annotations declare the mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false), so the safety burden is partly lifted; the description adds real value by disclosing that tag_name creates the tag if new and that the response reports how many were newly tagged. It stays silent on what happens if both client_ids and filters are supplied, and on whether already-tagged clients are skipped — the 'newly tagged' count hints at dedup but never says so, leaving a gap against idempotentHint=false.

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 action, then the targeting rule, then the tag-naming rule, then the return value — a sensible order with no filler sentences. The parenthetical filter enumeration is dense and slightly list-like, but every element maps to an actual 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 13-parameter, zero-required mutation tool with no output schema, the description covers targeting, tag naming, and the return value, which is most of what an agent needs. Remaining gaps are edge behavior: precedence when both targeting modes are given, and the effect on clients already carrying the tag.

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

Parameters5/5

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

The two parameters with no schema description — grouping_id and tag_name — are exactly the ones the description disambiguates, explaining that grouping_id targets an existing tag while tag_name creates one if new, with an example value. It also clarifies the OR relationship between client_ids and the filter set, which the flat schema cannot express on its own.

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 ('Apply a tag') plus resource ('clients') and scope ('a whole selection ... at once'), which immediately distinguishes it from single-record tagging and implies the inverse of untag_clients. It also names the sibling whose filters it reuses (list_clients), so an agent can place it in the tool family without opening a schema.

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 explicit selection guidance — target with EITHER client_ids OR the same filters as list_clients — plus a concrete use case ('modern mark for mailing'). It does not state exclusions, such as when to prefer untag_clients or how to handle a single client, but the positive routing guidance is clear.

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