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)"}
        }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states the tool performs a 'Set' action which implies mutation/write behavior, but doesn't disclose whether this requires specific permissions, whether changes are persistent, what happens to existing configurations, or any side effects. No information about error conditions, rate limits, or authentication requirements is provided.

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

Conciseness5/5

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

The description is extremely concise at just 6 words, with zero wasted language. It's front-loaded with the core action and target. Every word earns its place by conveying essential information about what the tool does.

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

Completeness2/5

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

For a configuration/mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens after setting the provider/model, whether the change is immediate or requires restart, what values are valid, or what the tool returns. The agent lacks crucial information about this write operation's behavior and consequences.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents both parameters fully with their types, optionality, and default values. The description adds minimal value beyond what's in the schema - it mentions 'LLM provider and model' which maps to the parameters but doesn't provide additional context about valid values, constraints, or relationships between parameters.

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 clearly states the tool's purpose with a specific verb ('Set') and identifies the target resources ('LLM provider and model'). It distinguishes this as a configuration tool rather than a query or execution tool. However, it doesn't explicitly differentiate from potential sibling tools that might also configure aspects of the system, though none of the listed siblings appear to be direct alternatives.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives or when not to use it. There's no mention of prerequisites, timing considerations, or relationship to other tools like 'initialize_mcts' or 'list_available_models' that might be related to system setup. The agent must infer usage context entirely from the tool name and parameters.

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

Install Server

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