Skip to main content

Describe Layer

The describe_layer tool returns the metadata of a single layer or table inside a feature service or map service. AI agents typically call it as a preparatory step before running a Query Data operation, so that they know which fields exist, what types those fields use, and what realistic values look like.

Tool name

describe_layer

Tool alias

Describe Layer

Objective

Inspect the metadata of a specific layer or table inside a feature service or map service, including field definitions, semantic field classifiers, and example field values.

Usage guidance

describe_layer inspects metadata about a specific layer or table inside a feature service or map service. The response combines structural metadata with example values for each field, giving an agent the information it needs to construct a valid follow-up query.

For each field, the response includes:

  • Field name

  • Esri field type—For example, esriFieldTypeString, esriFieldTypeDate, or esriFieldTypeOID.

  • Alias

  • Description

  • Sample values—Values drawn from real records in the layer.

  • Field value type—When available, a semantic classifier that hints at the field's intent, such as nameOrTitle, countOrAmount, or dateAndTime.

The response also returns the layer's name, type, description, extent, and spatial reference.

describe_layer is most useful when a client needs more information about a specific layer or table within a feature or map service—particularly as a required precursor before constructing WHERE clauses or selecting fields with query_data. Calling query_data without first inspecting the layer's fields is a common cause of failed or empty queries.

Inputs

describe_layer takes two required inputs:

  • serviceUrl—The URL of the service that contains the layer—not the URL of the layer itself.

  • layerId—The numeric ID of the layer or table within the service.

The layerId may come from prior conversation context, from a direct request that includes a layer URL, or from the service definition that describe_item returns. If the layer ID is not readily apparent, call describe_item first on the parent service to enumerate the available layers and tables. For details, see Describe Item.

When to use

  • The client wants to inspect metadata about a specific layer or table within a feature service or map service.

  • The agent needs to know the layer's fields and example values before invoking query_data to filter the data.

When not to use

  • The request requires analysis beyond inspecting and querying a layer. Use a geoprocessing workflow instead, such as a web tool exposed as a custom MCP tool.

  • The target is an item rather than a layer or table, such as a web map or dashboard. Use Describe Item instead.

Tip:

Always pass the service URL, not the layer URL. A common mistake is to copy a URL ending in /0 (the layer endpoint) into serviceUrl. Remove the trailing layer segment (for example, /0) and pass that number in layerId.

Sample prompts to test the tool

Send any of the prompts below to your MCP-compatible AI client to verify that describe_layer is working correctly. The prompts are grouped to exercise different ways an agent might invoke the tool—from direct schema inspection to implicit field discovery, query setup, ambiguous multi-step requests, and comparisons.

Note:

These prompts are for illustration only. Before you use them, modify them to match the data published in your ArcGIS Enterprise environment.

Direct schema inspection

  • Show me the schema for the New Jersey Preserved Farms layer.

  • List all the attributes available on the DE Development Applications service, with sample values.

  • Describe layer 0 of the SampleWorldCities map service.

  • Inspect the California feature service—what columns can I query on?

Implicit (field-discovery) prompts

  • What date range does the New Jersey Preserved Farms dataset cover?

  • Are there any status or category fields I can group SanFrancisco features by?

Query setup

  • List all cities in SampleWorldCities with population over 1 million.

Ambiguous and multi-step

  • Tell me what is interesting about the veg data.

  • I want to make a query against the California service—what should I know first?

Comparison

  • Compare the schemas of California and SanFrancisco.