Skip to main content

Search Portal Content

The Search Portal Content tool lets an AI client discover items in your ArcGIS Enterprise organization. It is typically the first tool an agent calls when a user asks something like find a layer of US counties or show me dashboards owned by Maria, because it returns the candidate items the agent can then describe or query in subsequent steps.

Tool name

search_portal_content

Tool alias

Search Portal Content

Objective

Search for organization items—such as web maps, feature services, map services, dashboards, and apps—in the organization, with optional filters and pagination.

Usage guidance

Search Portal Content searches for items in the organization. Two search modes are available—structured and passthrough—and they should not be combined. Both modes support common search options such as sorting and pagination.

Important:

Only items tagged with mcp are returned

Search Portal Content only returns organization items that are tagged with mcp. The mcp tag identifies the curated subset of items that their owners or administrators have chosen to expose to the MCP server. Items that are not tagged with mcp do not appear in results, even if they exist in the organization.

Search Portal Content also excludes ArcGIS Living Atlas of the World content, even if that content is available in your portal.

When results are empty or sparse, surface this scoping to the user—do not claim the organization lacks the data outright. The tag filter is injected automatically; never include tags:"mcp" in a passthrough q string yourself.

For how to tag and describe items so they are returned, see Prepare your content for use with MCP.

When a search returns 10 or fewer items and any of those items is a feature service or map service, the response also includes the service definition for each such item—saving the agent an extra round-trip to describe_item.

A structured search exposes a small set of string filters. Multiple filters in the same request are combined with logical AND, and each filter accepts only a single value. (For OR semantics within a single field, use a passthrough search instead.)

Filter Description
q A general search term applied across all metadata. Best used for generic search terms. To maximize results, logically group different terms with OR.
type Filter by item type—for example, Web Map, Feature Service, or Dashboard. Note: Feature Layer and Table are not valid item types here. To find layers, include (type:"feature service" OR type:"map service") in a passthrough q string instead.
typekeyword Filter by item type keyword—for example, Hosted Service, Data, or Analysis Result.
tag Filter by item tag—for example, preservation or conservation. Best used when the request explicitly mentions tags or tagged.
owner Filter by item owner—for example, john_doe or jane_smith.

A passthrough search sends a raw query string directly to the underlying ArcGIS Portal Directory API. Use it when the request needs Boolean logic (OR, NOT, grouping) or other advanced filtering that a structured filter cannot express.

How to choose between structured and passthrough

When deciding which search mode to use, follow these rules in order:

  1. If the client explicitly provided a raw query string to use as a passthrough, use it as-is in passthrough mode.

  2. Otherwise, if any of the following conditions are true, use passthrough mode. The agent should first call the helper tool Get Search Portal Content Passthrough Instructions, which returns guidance on how to construct a valid passthrough string.

    1. The request involves Boolean logic that cannot be expressed by AND-ing simple values together.

    2. The request contains subexpressions or other nesting.

    3. The request cannot be satisfied by a few simple filters AND-ed together.

  3. Otherwise, use a structured search.

Pagination and sorting

  • Pagination—start and num let the agent page through large result sets (default 5 per page, maximum 100).

  • Sorting—sortField and sortOrder let the agent sort by fields such as title, owner, type, or modified. Sorting by relevance to the query is the default when no field is specified.

Recommendations

  • Do not assume everything is a feature service. Only include the type filter when the user explicitly asks for a particular type.

  • For "layer" or "dataset" requests, include both feature and map services. Use a passthrough query like (type:"feature service" OR type:"map service") if it is not clear which the user wants.

  • Focus on key nouns when constructing search terms. Generalize qualifiers rather than capturing every adjective—for example, freshwater lakes in New Hampshire can usually be simplified to a search for lakes.

When to use

  • The user wants to search for ArcGIS items in their organization, such as web maps, feature services, dashboards, and so on.

  • The request can be answered by a structured search using a few simple filters AND-ed together.

  • The request can be answered by a passthrough search, including when the client has provided a raw q string directly.

When not to use

  • The client needs to search for non-ArcGIS items or resources.

  • The request requires integration with external systems or data sources.

  • The user already has a specific item ID. Use Describe Item instead.

  • The user wants metadata about a specific layer inside a known service. Use Describe Layer.

Sample prompts to test the tool

Send any of the prompts below to your MCP-compatible AI client to verify that Search Portal Content is working correctly. The prompts are grouped to exercise different aspects of the tool—from single-filter queries to multi-condition Boolean logic, semantic search, layer-level discovery, and pagination and sorting controls.

Note:

Prompts below are for illustrative purposes only. You might have to modify the prompts below to match the data you have published in your ArcGIS Enterprise environment before you use them.

Basic—single-filter queries

  • List feature services I have published in my organization.

  • List geoprocessing services I have published in my organization.

  • List services with OGC Feature layer type I have in my organization.

  • List services with WMS type I have in my organization.

  • List image services I have published in my organization, sorted by most recently modified.

Moderately advanced—multi-condition & semantic queries

  • Find feature services in my organization which have places and airports layers, but do NOT have stores or parks layers.

  • List hyperspectral image services from my organization that have a band count between 3 and 20.

Data discovery—layer-level existence checks

  • Do I have a cities layer in my organization?

  • Do I have continent data in my organization?

  • Do I have GolfCourses data in my organization?

Covers remaining parameters (pagination, sortOrder, num, start)

  • List all web maps in my organization, showing 5 at a time, sorted by creation date oldest first. Then show me the next page.

  • Do a raw passthrough search in my organization using the query: type:"Feature Service" AND owner:siteadmin AND tags:California