Gemini Web MCP
Use this skill for this repository's Gemini Web MCP server and low-token skill server.
Start Here
- Prefer
gemini_get_tool_manifestbefore choosing primary-server tools. It is always exposed bysrc.server, even whenGEMINI_TOOLS=coreorGEMINI_TOOLS=prompts. - Check manifest
current_enabled,groups, andworkflows; do not hard-code tool counts because the static manifest can include groups not loaded in the current process. - On the low-token server, prefer auth-free
account(action="manifest")andaccount(action="capabilities")before account calls that initialize Gemini. - Prefer read-only discovery first:
gemini_doctor, manifest/capabilities,gemini_probe_web_features, metadata-only history search, profile diagnostics, and inventory/list tools. - Treat
privacy=reads_private_chat_textand other private text tools as explicit-user-intent tools:gemini_read_chat,gemini_export_chat,gemini_search_chats(scan_turns=true), and research-report create actions that read chat text. - Treat destructive tools as requiring explicit user intent:
gemini_delete_chat,gemini_cleanup_test_artifacts(dry_run=false),gemini_delete_scheduled_action,gemini_reset_session,gemini_manage_gems(action="delete"), and prompt deletion.
Tool Surfaces
- Primary MCP server:
src.server- Use
GEMINI_TOOLS=modelorchatwhen an agent only needs to call Gemini models. - Use
GEMINI_TOOLS=historywhen an agent only needsgemini_historyfor list/scan/search/read/export chat history. - Use
GEMINI_TOOLS=history-organizewhen an agent needsgemini_history,gemini_notebooks, and explicit chat-to-Notebook moves. - Use
GEMINI_TOOLS=account-readwhen an agent only needsgemini_account_inventoryfor read-only Web surface inventory. - Use
GEMINI_TOOLS=scheduled-adminonly for explicitly authorized scheduled-action create/delete workflows. - Default
GEMINI_TOOLS=coreremains the broad content workflow: chat, media, files, and research. GEMINI_TOOLS=allis the full maintenance/verification surface, not a good default for general agents.GEMINI_TOOLS=promptsadds local prompt management plus always-on manifest/cookie helpers.
- Use
- Low-token skill server:
src.skill_server- Use
account(action="manifest")for compact tool guidance. - Use
account(action="capabilities")for the static Web capability map without cookies. - Use
account(action="features|links|usage|library|notebooks|scheduled|modes")for compact account-surface inventory. - Use
history(action="list|search|read|export|delete")for chat history. - Use
cleanup(dry_run=true)before deleting test chats or scheduled actions by marker. - Use
scheduled(action="list|get|create|delete")for compact scheduled-action workflows. - Use
create(type="music", model="pro")or primarygemini_generate_musicfor Lyria 3 Pro music requests. - Use
doctor(validate_browser=false)for low-cost local preflight before live account workflows. - Use
cookie(action="profiles")beforecookie(action="get", profile="...")when Chrome has multiple signed-in profiles.
- Use
Chat History Workflow
- Deep-scan metadata sources when completeness matters:
gemini_history(action="scan", limit=..., offset=..., response_format="json")
- List or search metadata first:
gemini_history(action="list", limit=..., offset=..., response_format="json")gemini_history(action="search", query=..., scan_turns=false, response_format="json")
- Only scan turn text when the user asks for content search:
gemini_history(action="search", query=..., scan_turns=true, turns_per_chat=..., max_chars_per_turn=...)
- Read/export one selected chat only after the user has indicated the target:
gemini_history(action="read", chat_id=...)gemini_history(action="export", chat_id=..., response_format="markdown"|"json")
- Move chats to native notebooks only after identifying both target chat and notebook:
gemini_notebooks(action="list", ...)gemini_move_chat_to_notebook(chat_id=..., notebook_id=...)gemini_notebooks(action="chats", notebook_id=...)
- Delete only with explicit confirmation:
gemini_delete_chat(chat_id=...)
Web Pro Coverage Rules
gemini_get_web_capabilitiesis the static observed Pro Web surface map.gemini_probe_web_featureschecks observed read-only RPC reachability and must not expose raw private RPC bodies.- Use
gemini_account_inventory(surface=...)or the manifestweb_surface_inventoryworkflow for read-only account inventory: public links, usage limits, native notebooks, library capabilities, scheduled actions, and tool mode status. - Treat
gemini_list_library_capabilitiesas localized template/capability discovery, not private Library asset export. - Treat
gemini_get_tool_mode_statusas a read-only Canvas/Guided Learning mode-status probe; Canvas document mutation remains disabled. - Guided Learning is exposed through chat
learning_mode; prefer this over UI assumptions. - Keep Drive picker, Canvas mutation, settings mutation, memory import mutation, public-link mutation, and unsupported scheduled-action recurrence/edit/toggle variants disabled until stable RPC contracts and explicit user authorization exist.
Media Workflow
- For music/video/image generation requests, use the MCP tool path and finish only when the tool reports saved local media files or an explicit export failure.
- For Lyria 3 Pro/fullsong claims, verify raw backend markers and saved media duration; do not trust wrapper labels, model names, or chat prose alone.
gemini_generate_musiccan recover media from raw chat payloads even whenresponse.mediais empty; inspect returned file paths and duration metadata before summarizing success.
Scheduled Actions
- Use observed daily create, registry list, by-id get, and explicit delete by id through
gemini_create_scheduled_action,gemini_list_scheduled_actions,gemini_get_scheduled_action, andgemini_delete_scheduled_action. - Refresh Chrome cookies first when account context matters. If the registry is unexpectedly empty, call
gemini_list_browser_cookie_profiles, thengemini_get_cookie_from_browser(profile="...")for the profile with Gemini cookies or scheduled registry entries. - After create/delete, check
verification_status; after create also checkreadable_by_id_after_create, and after delete checkdeleted_by_id_after_deleteortask_state_after_delete=deletedbefore claiming the task is gone.
Validation
Before finishing changes, run:
./.venv/bin/pytest -q
./.venv/bin/python -m py_compile src/tools/annotations.py src/tools/chat.py src/tools/media.py src/tools/file.py src/tools/research.py src/tools/prompts.py src/tools/manage.py src/server.py src/skill_server.py src/client_wrapper.py src/thinking_client.py src/constants.py
git diff --check
When changing manifest or capability metadata, also verify:
GEMINI_TOOLS=core ./.venv/bin/python - <<'PY'
import asyncio
from src.server import mcp
async def main():
tools = await mcp.list_tools()
print(len(tools), [t.name for t in tools if t.annotations is None])
asyncio.run(main())
PY
For skill-only changes, at minimum run the skill validator for both the local project copy and the public repo skill copy:
for path in .codex/skills/gemini-web-mcp .agents/skills/gemini-web-mcp; do
./.venv/bin/python /Users/jack/.codex/skills/.system/skill-creator/scripts/quick_validate.py "$path"
done
Keep evaluations/gemini_web_mcp_contract.xml aligned with gemini_get_tool_manifest and gemini_get_web_capabilities.