Skip to main content
Glama

Create a Spotlight rule

create_spotlight_rule

Add a rule with one trigger (when it applies) and one action (what the visitor sees), switched on immediately and applied after the existing rules. Location ids come from list_locations.

Input Schema

NameRequiredDescriptionDefault
nameYesWhat the rule is called, for create and update.
endsAtNoISO timestamp. After it the rule is dormant. Optional.
startsAtNoISO timestamp. Before it the rule is dormant. Optional.
actionKindYesWhat happens. banner = a message above the results; feature = move locations to the top or bottom; only = show just these, taken from the whole network; hide = remove these.
triggerKindYesWhen the rule applies. always = every search; no_results = a search that found nothing; radius = within a distance of a point; polygon = inside a drawn area; postcodes = a postcode list, only matched by a typed search; filter = while a tag filter is on.
actionFieldsNoThe action's own fields: {message, linkUrl, linkLabel} for banner, {locationIds: [...], position: 'top'|'bottom'} for feature, {locationIds: [...]} for only and hide.
triggerFieldsNoThe trigger's own fields: {lat, lng, radiusKm} for radius, {points: [[lat, lng], ...]} for polygon (at least three), {postcodes: [...]} allowing a trailing * for a prefix, {tagId} for filter. Empty for always and no_results.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare it is a non-read-only, non-destructive, open-world, non-idempotent write. The description adds genuinely non-structured behavior: the rule goes live immediately and is evaluated after pre-existing rules, which affects conflict outcomes. It does not cover failure modes or required permissions.

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?

Two sentences, both front-loaded: the structural contract (trigger + action) comes first, then the enablement/ordering behavior, then the id cross-reference. No filler and nothing redundant.

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 7-parameter nested write tool with no output schema, the description covers shape, activation state, ordering, and id sourcing, and the annotations carry the safety profile. What is missing is narrower: permission requirements and whether a rule id is returned or must be re-fetched via list_spotlight_rules.

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

Parameters3/5

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

Schema coverage is 100% and the enum/nested-object descriptions are unusually thorough, so the baseline is 3. The description adds only the 'one trigger, one action' constraint and the list_locations pointer for location ids — helpful, but marginal against a schema that already documents every field and value.

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 ('Add a rule') and immediately defines the rule's shape: one trigger, one action. The create_/update_/list_/delete_ naming makes the sibling split inferable, but the description itself never names the adjacent siblings (update_spotlight_rule, list_spotlight_rules), so it stops just short of a 5.

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?

Gives real operational context — the rule is enabled on creation and ordered after existing rules — and points to list_locations for sourcing location ids. It never says when to use this versus update_spotlight_rule or set_spotlight_rule_enabled, so usage is implied rather than specified.

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