Skip to main content
Glama
muend

arcgis-mcp-bridge

near_analysis

Calculate nearest-neighbor distances by adding NEAR_FID and NEAR_DIST fields to input features. Requires explicit confirmation to modify the dataset.

Instructions

Calculate nearest-neighbor distance from each input feature to nearby features using ArcPy Near. This mutates the input dataset by adding or updating NEAR_FID and NEAR_DIST fields, so confirm=true is required. Use a copied working dataset when exposing this workflow to an LLM or automated agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.0.1
    • addedInput schema / $defs / NearAnalysisInput / description
      Added value: +"Input contract for ArcPy Near, which mutates the input dataset."
    • changedInput schema / $defs / NearAnalysisInput / properties / confirm / description
      Previous value: -"Must be true: mutates the input dataset."New value: +"Must be true. near_analysis mutates the input dataset by adding or updating NEAR_* fields."
    • changedInput schema / $defs / NearAnalysisInput / properties / in_features / description
      Previous value: -"MODIFIED in place: NEAR_* fields added."New value: +"Absolute path to the input feature class that will be modified in place. ArcPy Near adds or updates NEAR_FID and NEAR_DIST fields, so use a copied working dataset when possible."
    • addedInput schema / $defs / NearAnalysisInput / properties / near_features / description
      Added value: +"Absolute path to the feature class used to find nearest features. The path must be inside a configured PathGuard allowed root."
    • changedInput schema / $defs / NearAnalysisInput / properties / search_radius / description
      Previous value: -"e.g. '1 Kilometers'"New value: +"Optional maximum search radius, for example '1 Kilometers'. Use None to let ArcPy search for the nearest feature without a radius limit."
  2. First observedv1.0.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries full behavioral disclosure. It explicitly states the tool mutates the input by adding/updating NEAR_FID and NEAR_DIST fields, requires confirm=true, and recommends using a copy. This fully informs an agent of the mutation risk and safety measures.

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?

Three concise sentences with no fluff. The first sentence states the core purpose, the second explains the mutation effect and prerequisite, and the third gives safety guidance. Highly efficient.

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 mutating tool with an output schema, the description covers all necessary context: what it does, what it changes, what input validation is needed, and best practices. Nothing critical is missing.

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 contains good descriptions for all parameters (100% coverage). The tool description reiterates the mutation and confirm requirement but adds no new parameter-specific meaning beyond the schema. Per guidelines, baseline 3 is appropriate.

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 starts with a clear verb ('Calculate nearest-neighbor distance') and specifies the resource ('each input feature'). It distinguishes from siblings like 'generate_near_table' by highlighting mutation and the confirm requirement.

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 advises using a copied working dataset when exposing to an LLM/automated agent and requires confirm=true. It does not explicitly name alternatives for non-mutating scenarios, but the advice is clear for this tool's mutation behavior.

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