Skip to main content
Glama

Count a search

count_search
Read-onlyIdempotent

Count the places of a search (the "search" returned by suggest_categories). Its input describes the search object in full (target, area, filters one by one, sort): read it to edit a search. Places already delivered to the account are left out unless search.excludeDelivered is false. When "exact" is false, say "≈ N".

Free.

Same call as POST /api/v1/search/count of the REST API.

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": {
      "search": "<search>"
    },
    "name": "count_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
searchYesThe search, as returned by POST /categories/suggest (field "search"). Send it back as is, edited if needed.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds genuinely new behavior: delivered places are excluded by default and never billed twice, and the count must be reported as "≈ N" when exact is false. The rounding/approximation rule is a meaningful disclosure an agent could not infer from annotations alone. It stops short of describing the response shape beyond the exact flag.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, front-loaded with the action and the source of the input, then the counting caveats, then the cost and REST equivalence. No padding or repetition of schema text; every sentence carries information.

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 tool with a very large nested schema and no output schema, the description correctly redirects the agent to read the input as the full search definition and explains the only output nuance (approximate counts). What is missing is a minimal statement of what is returned (an integer count, presumably with an exact flag), which the absent output schema leaves uncovered.

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% and there is only one top-level parameter, so the baseline is 3. The description adds a bit beyond the schema by framing the whole nested object as the editable search definition and by singling out search.excludeDelivered as the switch controlling delivered-place omission, which reinforces a subtle default buried in a large nested schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ("Count the places of a search") and identifies the provenance of its single input ("the search returned by suggest_categories"). It is clear what the tool does, though it never contrasts itself with the sibling preview_search or get_search_metrics, so sibling differentiation comes only from the name.

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

Usage Guidelines3/5

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

Implies usage by telling the agent the input describes a search in full and "read it to edit a search" before counting, and notes the call is free, which is real selection context. However, it never says when to count rather than preview or fetch metrics, nor states prerequisites such as needing a search object from suggest_categories first.

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.