Skip to main content

Get Search Portal Content Passthrough Instructions

The get_search_portal_content_passthrough_instructions tool returns guidance for building a raw q query string for search_portal_content when a structured search is not enough. An agent calls it before invoking search_portal_content in passthrough mode.

Tool name

get_search_portal_content_passthrough_instructions

Tool alias

Get Search Portal Content Passthrough Instructions

Objective

Return detailed instructions, syntax examples, and best practices for constructing a raw passthrough q string for the ArcGIS Portal Item Search API.

Usage guidance

get_search_portal_content_passthrough_instructions provides instructions for performing Search Portal Content invocations that require a passthrough approach. The tool is consulted by an agent that has already determined a structured search cannot satisfy the request, so that the agent can build a valid raw query string before calling search_portal_content.

Note:

mcp tag scoping is automatic

Like search_portal_content, all passthrough searches are automatically scoped to portal items tagged with mcp. The filter is injected by the underlying tool, so do not include tags:"mcp" in the q string.

ArcGIS Living Atlas of the World content is also excluded, even if that content is available in your portal.

When to use

The client wants to search for ArcGIS items in their portal, and the request cannot be satisfied by a structured search of simple AND-ed filters. Specifically, any of the following:

  • The client explicitly asked for a raw or passthrough search, or supplied a raw q string directly.

  • The request requires Boolean logic beyond simple AND—for example, OR across fields, or NOT/exclusion.

  • The request requires subexpressions or nesting—for example, (type:"feature service" OR type:"map service") AND owner:siteadmin.

When not to use

  • The request can be satisfied by a structured search using a few simple filters AND-ed together, without requiring complex Boolean logic (including NOT) or advanced filtering. Use search_portal_content directly in structured mode.

Sample prompts to test the tool

The prompts below are user-side requests that should cause the agent to call get_search_portal_content_passthrough_instructions first—because none of them can be satisfied by a simple AND-ed structured search. After the helper returns syntax guidance, the agent uses it to build a raw q string and submits the search by using Search Portal Content. Send any of these prompts to your MCP-compatible AI client to verify that the trigger flow works end to end.

Note:

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

NOT / exclusion

  • Find feature services in my ArcGIS Enterprise that have a Cities layer but do NOT have a Counties layer.

  • List all items in my ArcGIS Enterprise that are NOT image services.

OR across different fields

  • Find items in my ArcGIS Enterprise that are either image services OR owned by siteadmin.

  • Find all items in my ArcGIS Enterprise tagged with either 'California' or 'San Francisco'.

Nested subexpressions

  • Find items that are either feature services or image services AND are tagged with mcp.

    Note:

    This prompt intentionally uses mcp as a tag value. Verify that the agent does not add the mcp scoping filter to the q string a second time, because the filter is injected automatically.

Explicit raw q string

  • Do a raw passthrough search using this query: type:"Feature Service" AND owner:siteadmin AND tags:California

Date and range logic

  • Find all feature services in my ArcGIS Enterprise that were modified after January 1, 2024.

  • Which items in my ArcGIS Enterprise were created between 2022 and 2024?