Skip to main content
Google Search The Google Search app exposes Google web search through a single 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 cx is set) — behaves like a real google.com search of the entire web and returns a synthesized answer with cited sources.
  • Custom Search JSON API (legacy — when a Programmable Search Engine cx is set) — returns ranked organic results with rich filters (date, site, language, file type) and image search.
Authentication is a Google Cloud API key (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

A single search tool gives agents fresh, post-cutoff web information — news, prices, schedules, official docs, product specs — instead of guessing.

Grounded answers

The default Gemini Grounding backend returns a synthesized answer plus cited sources, rendered as clickable source cards in the chat.

Filtered & image search

With a Programmable Search Engine (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

You build agents in Agent Factory and want them to search the web. → Agent builder tab.

Platform admin

You run the platform and set up a shared Google Search key once for everyone. → Platform admin setup accordion below.

Workspace builder

You write Builder automations (DSUL) that call the 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:
    • Generative Language API — for the default Gemini Grounding backend.
    • Custom Search API — for the legacy cx backend.
  • 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).
  • For the Custom Search backend only: a Programmable Search Engine (the cx id), created at programmablesearchengine.google.com.
The Gemini API free tier is limited (e.g. ~20 requests/day for 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).
Goal: two optional one-time tasks — (1) set a shared platform Google key so workspaces that have not configured their own credential can still search, and (2) expose Google Search as a reusable capability in AI Governance so agent builders can pick it without pasting endpoint URLs.
Both tasks are optional. If every workspace pastes its own Google key, you can skip this section entirely — there is no per-tenant credential to register on the platform.

1. Configure the shared platform key

1

Get a Google credential

In the Google Cloud Console, create an API key (or a service-account key JSON) in a project where the Generative Language API (Grounding) and/or Custom Search API is enabled. For the Custom Search backend, also create a Programmable Search Engine and note its cx.
2

Enter the key through the core workspace's config app

Open the central 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).
When a platform global key is set, the shared connector instance becomes a global endpoint: the per-agent allowlist no longer applies there, and every agent granted the capability (Option A in the Agent builder tab) is accepted. The global key is the gate.

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 AI Governance. Agent builders then enable that capability on their agents instead of pasting a raw MCP endpoint.
1

Open AI Governance > Capabilities

Create (or edit) the Google Search capability.
2

Point it at the MCP endpoint

Set the capability’s MCP server URL to the connector’s MCP Endpoint, and set its Scope to:
context_id,agent_id,user_id
The agent_id in the scope is what lets the connector identify the calling agent.
3

Make it available to agent builders

Once created, the capability appears in the capability picker for agent builders in your organization, who enable it on their agents. Access to the catalog follows your organization’s existing roles; there is no per-capability role grant.
4

Smoke-test

From an agent that has the capability, trigger any web question. The agent calls search and grounds its answer on the returned sources.
Declaring the capability makes the connector available; it does not by itself authorize a specific agent. This connector follows the tenant-context model — when a workspace runs its own instance (Option B), which agents may actually call it is gated per-workspace by the authorized-agents allowlist in the configuration app. There is no OAuth auth-config JSON to attach in Governance: authentication is a server-side Google key, not a per-user OAuth flow.

Goal: let an agent you build in Agent Factory search the web through the search MCP tool.
Before an agent can call the connector, a Workspace builder must have installed and configured the Google Search app in a workspace (see the Workspace builder tab) — or a Platform admin must have set a shared platform key and published the capability (see the Platform admin setup accordion above).
This connector runs in the tenant app-instance context: your agent is identified by the 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: a Platform admin has set a shared platform Google key and published a Google Search capability (see the Platform admin setup accordion above, §2), so you just pick it from the catalog.
1

Open your agent in Agent Factory

Open the agent you want to extend and go to its capabilities / tools.
2

Add the Google Search capability

Browse the capability catalog, select Google Search, and enable it. The MCP endpoint URL and the Scope (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.
3

Use it

No sign-in is needed — the platform key backs every call. Ask the agent a question that needs the web; it calls search and grounds its answer with cited sources.
Convenient, but your agent runs against a shared, platform-managed instance: its Google credential and quota are owned by the platform and the instance accepts every agent that is granted the capability. Prefer Option B for anything beyond quick experiments.
For production agents, install the connector in your own workspace and point the agent at that workspace’s MCP endpoint.
Prefer this mode for security. Because the MCP runs in your app-instance context, the Google credential, the search quota and the authorized-agents allowlist are all scoped to your workspace — not shared platform-wide. You decide exactly which agents may call it and which Google key / backend backs them, and a misconfiguration elsewhere can never consume your quota. The shared catalog capability (Option A) is a broad surface many agents can reach; your own workspace is an isolated, least-privilege boundary.
1

Install and configure the connector in your workspace

Follow the Workspace builder tab: install Google Search in your workspace, open its Configuration app, paste your Google API key (or service-account JSON) and — optionally — a Programmable Search Engine cx.
2

Allowlist your agent

In that workspace’s config app, open Authorized agents and tick your agent (the Install capability button does this for you), or enable Allow all agents.
3

Add the MCP capability to your agent

In your agent, add a capability pointing at your workspace’s MCP Endpoint URL, and set its Scope to:
context_id,agent_id,user_id
The 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:
You have access to the Google Search MCP server (tool: search). Use it whenever the question needs fresh, post-cutoff or external web information (news, prices, schedules, official docs, product specs) — prefer calling search over guessing. Pass the user's intent as `q`; combine Google operators (site:, intitle:, -exclude, "exact phrase") inside q. When the tool returns an `answer` with sources, ground your reply on them and cite the links.
Legacy AI Knowledge agents (no native MCP picker): add the connector under Advanced > Tools > MCP and paste the MCP Endpoint URL. The agent still has to be allowlisted in the config app and its identity propagated so the connector can read its agent_id.

Available Tools

ToolDescription
searchGoogle web search returning top organic results plus, when available, a synthesized answer with cited sources. Backend auto-selected per tenant: Custom Search (with a configured cx, rich filters + image search) or Gemini Grounding (whole-web search of the entire web). Only q is required; combine Google operators inside q.

Output Formats

The search 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 in structuredContent.
  • both — the structured payload, with its JSON also rendered as text.
The structured payload shape is:
{
  "query": "…",
  "backend": "grounding | customSearch",
  "answer": "synthesized answer (Grounding only)",
  "totalResults": "123000",
  "searchQueries": ["…"],
  "items": [{ "title": "…", "link": "…", "displayLink": "…", "snippet": "…" }],
  "warnings": []
}
In Grounding mode, most 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

{
  "name": "search",
  "arguments": {
    "q": "prisme.ai pricing",
    "options": {
      "dateRestrict": "m1",
      "siteSearch": "prisme.ai",
      "num": 5
    }
  }
}
ParameterRequiredDescription
qYesSearch query. Supports Google operators (site:, intitle:, -exclude, "exact phrase").
options.cxNoProgrammable Search Engine id — overrides the tenant cx for this call (Custom Search only).
options.numNoNumber of results, 1-10 (Custom Search only).
options.dateRestrictNoRestrict by date: d{n} / w{n} / m{n} / y{n} (e.g. d7 = last 7 days).
options.siteSearchNoLimit to a site (e.g. wikipedia.org); pair with options.siteSearchFilter (i include / e exclude).
options.lr / options.gl / options.hlNoLanguage restriction (lang_fr), country boost (fr), interface language.
options.searchTypeNoSet to image for an image search (Custom Search only — rejected in Grounding). Pair with imgSize / imgType / imgColorType / imgDominantColor.
outputFormatNoverbose (default), structured, or both.

Error Handling

HTTP codeMeaning
400Bad request — invalid parameters or a malformed query.
401Authentication failed — the Google API key is missing, invalid or revoked.
403Forbidden — the key lacks access, or the matching API is not enabled (Generative Language API for Grounding, Custom Search API for the legacy cx backend).
404Not found — wrong endpoint or resource.
429Rate limit / quota exceeded — back off and retry (the Gemini free tier is especially low).
500 / 503Google service error — transient; retry shortly.

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 declare agent_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 errorsearchType: 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.

External Resources

Custom Search JSON API

Official reference for the Custom Search JSON API, query parameters and Programmable Search Engines.

Grounding with Google Search

How Gemini grounds answers with Google Search — the default backend of this connector.

Tool Agents

Learn how Agent Factory agents consume MCP tools in Prisme.ai.