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.
Description
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:
mcptag scoping is automaticLike
search_portal_content, all passthrough searches are automatically scoped to portal items tagged withmcp. The filter is injected by the underlying tool—do not includetags:"mcp"in theqstring you generate.
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
qstring directly. - The request requires Boolean logic beyond simple AND—for example,
ORacross fields, orNOT/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. Usesearch_portal_contentdirectly in structured mode.
Schema
The full JSON Schema definitions for the input parameters accepted by get_search_portal_content_passthrough_instructions and the output payload it returns are provided as separate files alongside this document.
Input schema
The tool takes no parameters; the input schema describes an empty object.
Download or view GetSearchPortalContentPassthroughInstructionsToolInputSchema.json
Output schema
The output schema describes a single instructions string containing the syntax guidance, examples, and accessory information the agent needs to construct a valid passthrough q string.
Download or view GetSearchPortalContentPassthroughInstructionsToolOutputSchema.json
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 via Search Portal Content. Send any of these prompts to your MCP-compatible AI client to verify that the trigger flow works end to end.
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.
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?
Reminder The agent should never include
tags:"mcp"in theqstring it constructs. Themcpscoping filter is injected automatically by the underlying tool. The "nested subexpressions" prompt above intentionally referencesmcpas a tag value to test that the agent does not re-inject the scoping filter on top of it.