Skip to main content
Glama
muend

arcgis-mcp-bridge

closest_facility

Find nearest facility routes for incident points using ArcPy Network Analyst. Matches demand locations to hospitals, stations, or other candidate facilities by network travel cost.

Instructions

Find nearest facility routes for incident points using ArcPy Network Analyst MakeClosestFacilityAnalysisLayer. Use this to match demand or incident locations to hospitals, stations, schools, depots, stores, or other candidate facilities by network travel cost. Requires a Network Analyst license; supports facilities_to_find and writes solved route features to out_features.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changedv0.6.3
    • addedInput schema / $defs / ClosestFacilityInput / description
      Added value: +"Input contract for finding nearest facilities for incident points."
    • addedInput schema / $defs / ClosestFacilityInput / properties / facilities / description
      Added value: +"Absolute path to candidate facility points that may be matched to incidents, such as hospitals, stations, schools, depots, or stores. The path must be inside a configured PathGuard allowed root."
    • addedInput schema / $defs / ClosestFacilityInput / properties / facilities_to_find / description
      Added value: +"Number of nearest facilities to find for each incident. Use 1 for nearest-only workflows, or a higher value for candidate comparison."
    • addedInput schema / $defs / ClosestFacilityInput / properties / incidents / description
      Added value: +"Absolute path to incident or demand point features that need nearest facility matches. The path must be inside a configured PathGuard allowed root."
    • changedInput schema / $defs / ClosestFacilityInput / properties / network_dataset / description
      Previous value: -"Path to the network dataset."New value: +"Absolute path to the ArcGIS network dataset used for routing or accessibility analysis. The path must be inside a configured PathGuard allowed root and must be usable by ArcPy Network Analyst."
    • changedInput schema / $defs / ClosestFacilityInput / properties / out_features / description
      Previous value: -"Solved result feature class."New value: +"Absolute output feature class path to create with the solved network analysis result. Existing outputs require overwrite=true."
    • addedInput schema / $defs / ClosestFacilityInput / properties / overwrite / description
      Added value: +"Set true only when replacing an existing network analysis output feature class is intended."
    • changedInput schema / $defs / ClosestFacilityInput / properties / travel_mode / description
      Previous value: -"Named travel mode (e.g. 'Driving Time'); None = default."New value: +"Optional named travel mode from the network dataset, for example 'Driving Time' or 'Walking Time'. Use None to let ArcPy use the network dataset default travel mode."
  2. First observedv1.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It states it uses ArcPy Network Analyst and writes to out_features, but it does not explain side effects (e.g., overwrite behavior, if input data are modified), performance considerations, or what happens if the license is missing. This is insufficient for safe invocation.

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 sentences, front-loads the core purpose, and avoids unnecessary details. Every sentence adds value, earning a top score.

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

Completeness2/5

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

Despite having an output schema, the description lacks critical context for a network analysis tool: prerequisites (beyond license), input data requirements, error scenarios, and differences from similar tools. This leaves gaps that could lead to incorrect usage.

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?

The input schema already provides detailed descriptions for all parameters. The description adds a brief summary of functionality ('supports facilities_to_find and writes solved route features'), but no meaningful extra semantics beyond the schema. Given high schema coverage, a score of 3 is appropriate.

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 clearly states it finds nearest facility routes for incident points using ArcPy Network Analyst. It lists example facility types (hospitals, stations, etc.), which adds specificity. However, it does not explicitly distinguish from sibling tools like od_cost_matrix or near_analysis, leaving some ambiguity.

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?

The description mentions the license requirement and suggests use for matching incidents to facilities, providing some context. But it lacks explicit guidance on when not to use this tool or how it compares to alternatives, leaving the agent to infer usage boundaries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools