Skip to main content
Glama

EasyTerritory MCP

schedule_visits

[Tier 1 — Periodic Scheduling] When: accounts carry a recurring cadence (every 7 days, twice a month) and the user asks which day each visit happens. Expands demand across a repeating horizon and packs it into daily work clusters (buckets) under one technician-day workload cap. This tool decides the day. Neighbors: auto_build, cluster_points, calculate_route. When the user said route and a visit-frequency column exists, confirm they want a schedule, not calculate_route, before calling. It creates no TAL and assigns no technician. Prerequisite: ingest_accounts completed for point_layer with the cadence column declared. Omit ts and ts_handle when the session id argument is already set. That session is the TS. An undeclared column fails with UNDECLARED_FIELD. Required: point_layer, visit_frequency_field, dwell_time, daily_capacity. Ask the user for dwell and the daily cap; never invent them. frequency_unit=interval_days means the value is the maximum days between visits (so a 3-day cadence in a 14-day horizon is 5 visits, not 4); visits_per_horizon means the count across the horizon. Values in never_visit_values (default 0, null, empty) are excluded and reported in excluded_accounts, never silently dropped. Example — weekly and biweekly accounts across 8-hour technician days: point_layer=accounts, visit_frequency_field=service_interval_days, dwell_time={type: scalar, value: 45, unit: minutes}, daily_capacity={mode: not_to_exceed, hours: 8}, max_buckets_per_day=3. bucket_workload_hours is in-bucket drive plus dwell with NO visit-frequency multiplier: it is neither territory workload nor route_workload_hours — never sum or compare them. Re-running with the same visit_layer_name replaces that schedule in place; a different name adds a second one for comparison. After submission, follow do_this_next with the returned task_id: sleep exactly sleep_ms while next_action=sleep_and_poll, fetch the result once on consume_result, and stop on stop_error. Next: calculate_route over the visits layer filtered to one bucket_id to drive that day. Full atom: ezt://guidance/workflows/periodic-visit-schedule. Scenarios: PS-001..PS-008.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tsNo
horizonNo
objectiveNo
ts_handleNo
dwell_timeNo
point_layerYes
daily_capacityNo
frequency_unitNointerval_days
map_session_idNo
schedule_labelNo
guidance_handleNo
emit_visit_layerNo
visit_layer_nameNo
expected_revisionNo
never_visit_valuesNo
max_buckets_per_dayNo
visit_frequency_fieldYes
cadence_flexibility_pctNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

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?

With no annotations, the description carries the full behavioral burden and does so well: it discloses the no-TAL/no-technician side effects, in-place replacement semantics for a repeated visit_layer_name vs. adding a second schedule, the UNDECLARED_FIELD failure mode, exclusion reporting (never silently dropped), and the post-submission sleep/poll/consume protocol. This is far beyond what a name and schema 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?

It is long and dense, but front-loads the tier label, trigger condition, and core behavior before drilling into parameter nuance and workflow handoff. Most sentences carry unique information, though the volume approaches manual territory and a few constraints could be tightened.

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?

An output schema exists, so return values needn't be described, and the description still fills the remaining gaps: prerequisites, error behavior, ambiguity resolution against calculate_route, and the do_this_next follow-up. For a complex 18-parameter scheduler, an agent has everything needed to call it correctly.

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 description coverage is 0% with 18 parameters, so the description must compensate, and it does for the critical ones: it explains ts/ts_handle omission, frequency_unit semantics (interval_days vs. visits_per_horizon), never_visit_values defaults, visit_layer_name behavior, and max_buckets_per_day. However, roughly half the parameters (horizon, objective, map_session_id, schedule_label, guidance_handle, emit_visit_layer, expected_revision, cadence_flexibility_pct) receive no explanation.

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?

The description uses a specific verb+resource framing ('Expands demand across a repeating horizon and packs it into daily work clusters'), and even states the core decision explicitly ('This tool decides the day'). It distinguishes itself from siblings by naming auto_build, cluster_points, and calculate_route, and by clarifying 'It creates no TAL and assigns no technician.'

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?

It gives an explicit trigger condition ('When: accounts carry a recurring cadence... and the user asks which day each visit happens'), names the neighbors, and even handles the ambiguity case ('When the user said route and a visit-frequency column exists, confirm they want a schedule, not calculate_route'). Prerequisites (ingest_accounts completed with cadence column declared) and follow-up routing are both stated.

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