list_models
Retrieve available Gemini AI models and current bridge status to select appropriate models for high-performance, stateful AI interactions through the MCP server.
Instructions
List available Gemini models and current bridge state. Returns known models, current active model, and agent info.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list_models"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |
Implementation Reference
- src/geminimcp/server.py:939-960 (handler)The tool `list_models` is defined and implemented as an async function decorated with @mcp.tool. It returns a dictionary containing available models and bridge status.
@mcp.tool( name="list_models", annotations=ToolAnnotations( title="List Available Models", readOnlyHint=True, destructiveHint=False, idempotentHint=True, openWorldHint=False, ), description="List available Gemini models and current bridge state. " "Returns known models, current active model, and agent info.", ) async def list_models() -> Dict[str, Any]: """List available models and bridge status.""" return { "models": _KNOWN_MODELS, "approval_modes": list(_APPROVAL_MODES.keys()), "current_model": _bridge._current_model or "(not started)", "agent_info": _bridge._agent_info or None, "bridge_version": VERSION, "process_running": _bridge._proc is not None and _bridge._proc.poll() is None, }