Skip to main content
Glama

Turn a target into categories

suggest_categories
DestructiveIdempotent

Entry point for ANY target: call it before any search, and never invent category ids. Give the target in plain words, WITHOUT the place ("independent car repair shops", "restaurants that could use an online booking tool") and the area from find_areas. Primavera's engine picks the Google Maps categories in groups and counts them in the area. Returns "selection" (groups, categories left out and why, what the data cannot tell) and "search", the object that count_search, get_search_metrics, preview_search, estimate_list and create_list take: pass it on as is, or edited. Costs 100 credits (maxCredits ≥ 100), refunded when no selection comes back. A request too vague is refused with clarification_needed, refunded: ask the user the question in error.details, then call again with the answer.

Paid: maxCredits (the most credits this call may spend, never exceeded) and idempotencyKey (a new UUID v4 for this operation) are required; without them nothing runs. To retry after an error or a timeout, send the same idempotencyKey with the same arguments: nothing is charged twice. Ask the user before calling it.

Same call as POST /api/v1/categories/suggest 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": {
      "request": "<request>",
      "maxCredits": "<maxCredits>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "suggest_categories"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoArea to search, as returned by GET /areas (field "area"). Default: that of "search", else the whole country.
searchNoA search to refine: its area, filters, exclusions and groups are kept (the groups become the previous selection). The "search" object returned by suggest_categories (target, area, filters, sort), sent as is or edited; its full schema is the "search" input of count_search. An invalid search is refused with invalid_request and the fields to fix.
countryNoCountry to search (default: that of "search", else fr).
requestYesThe target as the user would say it, WITHOUT the place: "independent car repair shops", "restaurants that could use a booking tool". What the client sells works too.
previousNoThe selection to update (default: the groups of "search"); null starts afresh.
maxCreditsYesMust be at least 100: the price of a suggestion.
idempotencyKeyYesA new UUID v4 for this operation (sent as the Idempotency-Key of the API). Reuse it only to retry the very same call: the saved result comes back, nothing is charged twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare this is a non-read-only, destructive, idempotent call, and the description adds the details that matter: 100-credit cost with maxCredits floor, refund when no selection comes back, refund plus clarification_needed on vague requests, and same-idempotencyKey retry with no double charge. Consent requirement and the shape of the return ("selection" with omitted groups and data limits, "search") go beyond what the annotations convey.

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 imperative 'call it before any search', and the paid/retry block is separated out. Some sentences are long and run together (cost, refund and clarification handling in one stretch), but nearly every clause carries operational information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 7-parameter tool with nested objects, no output schema and paid semantics, the description covers input shape, return value, cost, refunds, error handling and retry, which is everything an agent needs to call it safely.

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 meaning: maxCredits is the ceiling never exceeded, idempotencyKey is a fresh UUID v4 reusable only for the identical retry, request excludes the place with concrete examples, and the returned "search" is meant to be passed as-is or edited. It does not explain the previous/search interplay beyond a brief note, keeping it short of a 5.

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 (turn a target into Google Maps categories in groups, counted in an area) and positions itself explicitly as the entry point that must be called before any search. The prohibition on inventing category ids separates it cleanly from find_categories and the search siblings.

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

Usage Guidelines5/5

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

Gives ordering (call before any search), input shape (target without the place, area from find_areas), consent policy (ask the user before calling), and the failure path (on clarification_needed, ask the user the question in error.details then call again). Alternatives are implied by 'never invent category ids' and the explicit handoff of the returned "search" object to count_search/get_search_metrics/preview_search/estimate_list/create_list.

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.