Skip to main content
Glama

Set location targeting

set_location_targeting
Idempotent

Apply location targeting: EITHER an admin-area selection (assoc_type + values, US: region/division/state/county/dma; UK: region/constituency/county/district) OR a postcode list (postcodes; [] clears). location_text is the free-text label manual panels see. Use convert_location_text first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valuesNoAreas for assoc_type (from convert_location_text.admin.values).
postcodesNoPostcode list (max 50000); [] clears location targeting.
survey_idYesSurvey id (see list_surveys, or the survey_id returned by a create tool).
assoc_typeNoAdmin-area type.
location_textNoHuman-readable location description to store.

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?

Annotations already carry idempotentHint=true and readOnlyHint=false, so the core safety profile is known. The description adds valuable behavioral context beyond annotations: '[] clears' documents the clearing behavior, and it explains that location_text is the label used by manual panels. This is useful, non-obvious behavior an agent could not recover from the schema alone.

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?

The description is two compact sentences with no filler. It front-loads the main action, packs both mode branches, clearing behavior, label semantics, and a prerequisite pointer into a highly efficient structure.

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 5-parameter tool with no output schema, the description covers both execution modes, the clearing case, the free-text label, and the prerequisite conversion step. It does not describe response behavior or explicitly name set_targeting as a sibling alternative, but the schema already documents survey_id requirements and postcode limits, so the description is sufficiently complete for correct invocation.

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%, so the baseline is 3. The description adds meaning beyond individual property docs by specifying the mutual-exclusion relationship between assoc_type/values and postcodes, clarifying the [] clears semantics, and explaining what location_text represents. This genuinely helps an agent assemble a valid parameter set.

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?

The description states the specific action 'Apply location targeting' and clearly distinguishes two modes: admin-area selection versus postcode list. It references convert_location_text as a prerequisite, but it does not explicitly differentiate itself from the sibling set_targeting, so an agent may still need to infer the boundary between them.

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?

The description gives explicit usage guidance: 'Use convert_location_text first' and explains the EITHER/OR branching between assoc_type+values and postcodes. It does not explicitly state when not to use this tool versus set_targeting, but the mode selection and prerequisite are clear enough for typical use.

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.