search tool. It can be consumed two ways: as a remote MCP server that Agent Factory agents call as a tool, or as a Builder app whose instruction you call directly from DSUL. It runs in the tenant app-instance context (it resolves the installing workspace’s own Google credential) and automatically routes between two backends depending on the tenant configuration:
- Gemini Grounding (default — when no
cxis set) — behaves like a real google.com search of the entire web and returns a synthesizedanswerwith cited sources. - Custom Search JSON API (legacy — when a Programmable Search Engine
cxis set) — returns ranked organic results with rich filters (date, site, language, file type) and image search, but searches only the sites whitelisted in the Programmable Search Engine’s context, never the open web. Google has removed the “Search the entire web” option for new Programmable Search Engines, so this backend cannot cover the whole web — use Grounding (leavecxempty) for that.
AIza…) or a service-account JSON (signed into a short-lived Bearer token). Agents are identified by the capability Scope context_id,agent_id,user_id and gated by a per-workspace authorized-agents allowlist.
Web search as a tool
search tool gives agents fresh, post-cutoff web information — news, prices, schedules, official docs, product specs — instead of guessing.Grounded answers
Filtered & image search
cx), switch to the Custom Search backend for date/site/language filters, file-type restriction and image search.Who is this for?
This connector is used by three different roles. Jump to the section that matches yours — each one is self-contained.Agent builder
Platform admin
Workspace builder
search instruction directly. → Workspace builder tab.Prerequisites (Google side)
- A Google account with a Google Cloud project.
- The matching API must be enabled in that project:
- Gemini API (listed as Generative Language API,
generativelanguage.googleapis.com) — for the default Gemini Grounding backend. - Custom Search API (
customsearch.googleapis.com) — for the legacycxbackend.
- Gemini API (listed as Generative Language API,
- A credential, one of:
- A Google Cloud API key (
AIza…) — APIs & Services > Credentials > Create credentials > API key. - A service-account key JSON — for server-to-server use (signed JWT exchanged for a Bearer token).
- A Google Cloud API key (
- For the Custom Search backend only: a Programmable Search Engine (the
cxid), created at programmablesearchengine.google.com. A PSE searches only the sites you add to its context — Google has retired the “Search the entire web” option for newly created engines, so the Custom Search backend can no longer span the open web. For whole-web coverage, leavecxempty and use the Grounding backend.
gemini-2.5-flash). For production traffic, enable billing on the Cloud project or use the Custom Search backend (100 free queries/day, then paid).Platform admin (Governance) — one-time platform setup
Platform admin (Governance) — one-time platform setup
1. Configure the shared platform key
Enable the right API in the Cloud project
- Gemini Grounding (default). Enable the Gemini API — listed in the Cloud Console as Generative Language API (
generativelanguage.googleapis.com); the two names are the same service. Grounding with Google Search is not a separate API to enable: it is thegoogle_searchtool exposed inside the GeminigenerateContentcall, so enabling the Gemini API is all that the Grounding backend needs. - Custom Search (legacy,
cxset). Enable the Custom Search API (customsearch.googleapis.com) and create a Programmable Search Engine at programmablesearchengine.google.com, noting itscx. Note the scope: a PSE returns results only from the sites whitelisted in its context, never the whole web — Google has removed the “Search the entire web” option for new engines. For broad web coverage, leavecxempty and use the Grounding backend instead.
gcloud services enable generativelanguage.googleapis.com).Get a Google credential
https://www.googleapis.com/auth/generative-language scope when exchanging the JWT.Enter the key through the core workspace's config app
google-search workspace and launch its Configuration app maintainer view — <studio>/apps/google-search (e.g. https://studio.prisme.ai/apps/google-search). Follow the in-app instructions to paste the platform global key (and optional cx). The app stores it in the core workspace’s secrets for you — do not edit Studio’s raw Secrets by hand. The global key stays in the google-search workspace and is never inherited by tenant instances; only search results are returned to tenants (proxied through the core centralSearch webhook).2. Declare the capability in AI Governance
Generic connectors — broad tool surfaces meant to be shared across many agents — are best exposed as a named capability in the org Capabilities catalog. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.mcp-type catalog entry pointing at this workspace’s MCP endpoint with the Scope context_id,agent_id,user_id already set. It also detects an existing entry and offers Update catalog entry instead. The button is shown only to org owners / admins, and the published entry is org-wide — every builder in the org can then attach the connector. Use this instead of the manual steps below; they remain for when you want to author the capability by hand.Open AI Governance > Capabilities
Point it at the MCP endpoint
agent_id in the scope is what lets the connector identify the calling agent.Make it available to agent builders
Smoke-test
search and grounds its answer on the returned sources.- Agent builder (Agent Factory)
- Workspace builder (DSUL)
Agent builder
Goal: let an agent you build in Agent Factory search the web through thesearch MCP tool.agent_id that Agent Factory injects through the capability Scope, and that agent must appear in the connector’s authorized-agents allowlist (managed in the configuration app). The Google credential itself is resolved server-side — never exposed to the agent.There are two ways to wire it up. Pick based on how much isolation you need.Option A — Enable the shared capability from the catalog
The fastest path: an org owner / admin has published a Google Search capability to the org Capabilities catalog (typically via the config app’s one-click Add to catalog button — see the Platform admin setup accordion above, §2), so you just pick it from the catalog. When the published entry points at a shared instance backed by a platform Google key, no per-agent allowlist applies.Open your agent in Agent Factory
Add the Google Search capability
context_id,agent_id,user_id) are already wired by the admin — nothing to paste, and the shared instance accepts every agent granted the capability, so there is no allowlist step on your side.Use it
search and grounds its answer with cited sources.Option B — Run it from your own workspace (recommended)
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.Install and configure the connector in your workspace
cx.Allowlist your agent
Add the MCP capability to your agent
agent_id is what lets the connector identify and authorize your agent — without it, every call is rejected with an explicit “agent could not be identified” message.Brief the agent in its system prompt
Whichever option you pick, wiring the capability is not enough — the agent must know the tool exists and when to use it. Copy-pasteable starter:agent_id.Available Tools
Output Formats
Thesearch tool accepts an outputFormat argument that controls the MCP response shape:verbose(default) — a human-readable markdown view (answer + sources with links + the queries actually run), optimized for LLM consumption and clickable source cards.structured— concise machine-readable JSON instructuredContent.both— the structured payload, with its JSON also rendered as text.
options.* parameters are hints Gemini may ignore — anything skipped is reported in warnings. searchType: "image" is rejected in Grounding mode (Custom Search only).Tool Details
search
Error Handling
Common Issues
“This agent is not authorized to use this connector” — The calling agent is not in the allowlist. Open the configuration app → Authorized agents → tick this agent (or enable Allow all agents) and Save. “The calling agent could not be identified” — The MCP capability Scope does not declareagent_id, so Agent Factory never injects the agent identity. Set the Scope to context_id,agent_id,user_id on the capability, then allow the agent in the config app.
“The platform global Google key is not configured” / “No platform global Google key is configured” — The workspace has no credential of its own and no platform global key is set. Paste a Google API key in the config app, or ask the platform administrator to set the global key on the core google-search workspace.
“Google API credential is malformed” — The pasted value is neither a valid AIza… API key nor a parseable service-account JSON. Re-copy the credential from the Google Cloud Console.
Image search returns nothing / an error — searchType: image only works on the Custom Search backend. Configure a Programmable Search Engine cx in the config app; in Grounding mode image search is rejected.
Filters seem ignored — In Grounding mode most options.* parameters (num, dateRestrict, siteSearch, …) are hints Gemini may not honor; check the warnings array in the structured output. Set a cx to switch to Custom Search, where filters are enforced.