Skip to main content
Glama

set_provider

Configure the LLM provider and model for the MCTS MCP Server to optimize Monte Carlo Tree Search-based analysis and decision-making processes.

Instructions

Set the LLM provider and model

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel name (optional)
providerNoProvider namegemini

Implementation Reference

  • The handler function for the 'set_provider' tool. It updates the server_state with the new provider (only 'gemini' supported) and optional model, returning success status and config.
    def set_provider(provider: str = "gemini", model: str | None = None) -> dict[str, Any]: """ Set the LLM provider and model configuration. Args: provider: LLM provider name (currently only 'gemini' supported) model: Specific model name to use (optional) Returns: Dict containing success status and new configuration Note: Currently only supports Gemini provider. Other providers will return an error. """ if provider.lower() != "gemini": return {"error": "Only 'gemini' provider is currently supported", "status": "error"} server_state["provider"] = provider.lower() if model: server_state["model"] = model return { "status": "success", "provider": server_state["provider"], "model": server_state["model"], "message": f"Provider set to {provider}" + (f" with model {model}" if model else "") }
  • Registration of the 'set_provider' tool in the list_tools handler, including its name, description, and input schema.
    types.Tool( name="set_provider", description="Set the LLM provider and model", inputSchema={ "type": "object", "properties": { "provider": {"type": "string", "description": "Provider name", "default": "gemini"}, "model": {"type": "string", "description": "Model name (optional)"} } } ),
  • Dispatch logic in the call_tool handler that invokes the set_provider function when the tool is called.
    elif name == "set_provider": result = set_provider(**arguments)
  • Input schema definition for the set_provider tool, defining provider and optional model parameters.
    inputSchema={ "type": "object", "properties": { "provider": {"type": "string", "description": "Provider name", "default": "gemini"}, "model": {"type": "string", "description": "Model name (optional)"} } }

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/angrysky56/mcts-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server