Skip to main content
Glama
Google Workspace MCP Server

Google Workspace MCP Server

by akilja24

search_custom_siterestrict

Restrict Google Custom Search to specific sites or domains to find targeted results from only the websites you choose.

Instructions

Performs a search restricted to specific sites using Google Custom Search.

Args: user_google_email (str): The user's Google email address. Required. q (str): The search query. Required. sites (List[str]): List of sites/domains to search within. num (int): Number of results to return (1-10). Defaults to 10. start (int): The index of the first result to return (1-based). Defaults to 1. safe (Literal["active", "moderate", "off"]): Safe search level. Defaults to "off".

Returns: str: Formatted search results from the specified sites.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "user_google_email": "<user_google_email>",
      "q": "<q>",
      "sites": "<sites>"
    },
    "name": "search_custom_siterestrict"
  }
}

Input Schema

NameRequiredDescriptionDefault
qYes
numNo
safeNooff
sitesYes
startNo
user_google_emailYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.13.1

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It does disclose useful traits: num is bounded to 1-10, start is 1-based pagination, and safe search has three levels, plus it returns 'formatted search results'. It omits authentication requirements for user_google_email, quota/rate-limit behavior, error conditions, and what happens when sites is empty or invalid.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The docstring is front-loaded with the purpose sentence before the Args block, and each line earns its place by documenting a distinct parameter. It repeats defaults that already exist in the schema and includes a Returns line that duplicates the output schema, but neither is costly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, the description needn't explain return values, yet it lacks the auth/OAuth context an agent needs before calling a Google API with user_google_email, and it gives no guidance on sibling selection. For a 6-parameter authenticated search tool with zero annotation coverage, this is adequate but leaves real gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it largely does: all six parameters are explained with meaning, default values, and constraints (num 1-10, start 1-based, safe enum values). The one gap is the expected format of 'sites' entries (bare domains vs full URLs), which is left ambiguous.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb and resource ('Performs a search restricted to specific sites using Google Custom Search') and the site-restriction scope clearly separates it from an unrestricted search. However, it never names the sibling tool search_custom, so the agent must infer which of the two to pick from the scope phrase alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use/when-not guidance, no mention of the alternative unrestricted search tool, and no prerequisites stated. Usage is only implied by the phrase 'restricted to specific sites', which is enough to infer intent but not to make a confident routing decision between siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools