Search Content
The Search Content tool lets an AI client discover ArcGIS Portal 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 ArcGIS Portal items—such as web maps, feature services, map services, dashboards, and apps—in the user's portal and organization, with optional filters and pagination.
Description
Search Content searches for ArcGIS Portal items in the user's portal and 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
mcpare returnedSearch Content only returns portal items that are tagged with
mcp. Themcptag identifies the curated subset of items that the portal administrator has explicitly opted to expose to the MCP server. Items that are not tagged withmcpwill not appear in results, even if they exist in the portal.When results are empty or sparse, surface this scoping to the user—do not claim the portal lacks the data outright. The tag filter is injected automatically; never include
tags:"mcp"in a passthroughqstring yourself.
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.
Structured search
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. |
Passthrough search
A passthrough search sends a raw query string directly to the underlying ArcGIS Portal 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:
- If the client explicitly provided a raw query string to use as a passthrough, use it as-is in passthrough mode.
- Otherwise, use passthrough mode if any of the following are true. For complex queries, 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. - The request involves Boolean logic that cannot be expressed by AND-ing simple values together.
- The request contains subexpressions or other nesting.
- The request cannot be satisfied by a few simple filters AND-ed together.
- Otherwise, use a structured search.
Pagination and sorting
- Pagination —
startandnumlet the agent page through large result sets (default 5 per page, maximum 100). - Sorting —
sortFieldandsortOrderlet the agent sort by fields such astitle,owner,type, ormodified. Sorting by relevance to the query is the default when no field is specified.
Recommendations
- Don't assume everything is a feature service. Only include the
typefilter 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 portal—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
qstring 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.
Schema
The full JSON Schema definitions for the input parameters accepted by Search Content and the output payload it returns are provided as separate files alongside this document.
Input schema
The input schema describes the structuredFilter, passthrough, and options parameters that an MCP client can send to invoke the tool.
Download or view SearchPortalContentToolInputSchema.json
Output schema
The output schema describes the response object returned by the tool, including the echoed query, paged search results, and—when ten or fewer items are returned—the embedded service definitions for any feature service or map service items.
Download or view SearchPortalContentToolOutputSchema.json
Sample prompts to test the tool
Send any of the prompts below to your MCP-compatible AI client to verify that Search 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.
Basic — single-filter queries
- List feature services I have published in my ArcGIS Enterprise.
- List geoprocessing services I have published in my ArcGIS Enterprise.
- List services with OGC Feature layer type I have in my ArcGIS Enterprise.
- List services with WMS type I have in my ArcGIS Enterprise.
- List image services I have published in my ArcGIS Enterprise, sorted by most recently modified.
Moderately advanced — multi-condition & semantic queries
- Find feature services in my ArcGIS Enterprise which have places and airports layers, but do NOT have stores or parks layers.
- List hyperspectral image services from my ArcGIS Enterprise that have a band count between 3 and 20.
Data discovery — layer-level existence checks
- Do I have a cities layer in my ArcGIS Enterprise?
- Do I have continent data in my ArcGIS Enterprise?
- Do I have GolfCourses data in my ArcGIS Enterprise?
Covers remaining parameters (pagination, sortOrder, num, start)
- List all web maps in my ArcGIS Enterprise, showing 5 at a time, sorted by creation date oldest first. Then show me the next page.
- Do a raw passthrough search in my ArcGIS Enterprise portal using the query: type:"Feature Service" AND owner:siteadmin AND tags:California