Skip to main content
Glama
Cam10001110101

mcp-server-ollama-deep-researcher

configure

Set research parameters including loop count, AI model selection, and search API configuration for in-depth topic investigation.

Instructions

Configure the research parameters (max loops, LLM model, search API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxLoopsNoMaximum number of research loops (1-10)
llmModelNoOllama model to use (e.g. llama3.2)
searchApiNoSearch API to use for web research

Implementation Reference

  • The handler function for the 'configure' tool. It processes input arguments to update the global research configuration (maxLoops, llmModel, searchApi) with validation, or returns the current configuration if no arguments provided.
        case "configure": {
          const newConfig = request.params.arguments;
          let configMessage = '';
    
          if (newConfig && Object.keys(newConfig).length > 0) {
            try {
              // Validate new configuration
              if (newConfig.maxLoops !== undefined) {
                if (typeof newConfig.maxLoops !== 'number' || newConfig.maxLoops < 1 || newConfig.maxLoops > 10) {
                  throw new Error("maxLoops must be a number between 1 and 10");
                }
              }
    
              if (newConfig.searchApi !== undefined) {
                if (newConfig.searchApi !== 'perplexity' && newConfig.searchApi !== 'tavily' && newConfig.searchApi !== 'exa') {
                  throw new Error("searchApi must be 'perplexity', 'tavily', or 'exa'");
                }
                // Validate API key for new search API
                validateApiKeys(newConfig.searchApi);
              }
    
              // Type guard to ensure properties match ResearchConfig
              const validatedConfig: Partial<ResearchConfig> = {};
              if (typeof newConfig.maxLoops === 'number') {
                validatedConfig.maxLoops = newConfig.maxLoops;
              }
              if (typeof newConfig.llmModel === 'string') {
                validatedConfig.llmModel = newConfig.llmModel;
              }
              if (newConfig.searchApi === 'perplexity' || newConfig.searchApi === 'tavily' || newConfig.searchApi === 'exa') {
                validatedConfig.searchApi = newConfig.searchApi;
              }
              
              config = {
                ...config,
                ...validatedConfig
              };
              configMessage = 'Research configuration updated:';
            } catch (error) {
              return {
                content: [
                  {
                    type: "text",
                    text: `Configuration error: ${error instanceof Error ? error.message : String(error)}`,
                  },
                ],
                isError: true,
              };
            }
          } else {
            configMessage = 'Current research configuration:';
          }
    
          return {
            content: [
              {
                type: "text",
                text: `${configMessage}
    Max Loops: ${config.maxLoops}
    LLM Model: ${config.llmModel}
    Search API: ${config.searchApi}`,
              },
            ],
          };
        }
  • src/index.ts:129-150 (registration)
    The tool registration in the ListTools handler, defining the name, description, and input schema for the 'configure' tool. This makes the tool available to MCP clients.
      name: "configure",
      description: "Configure the research parameters (max loops, LLM model, search API)",
      inputSchema: {
        type: "object",
        properties: {
          maxLoops: {
            type: "number",
            description: "Maximum number of research loops (1-10)"
          },
          llmModel: {
            type: "string",
            description: "Ollama model to use (e.g. llama3.2)"
          },
          searchApi: {
            type: "string",
            enum: ["perplexity", "tavily", "exa"],
            description: "Search API to use for web research"
          }
        },
        required: [],
      },
    },
  • The input schema defining the parameters for configuring research: maxLoops (number), llmModel (string), searchApi (enum). No required fields, allowing partial updates.
    inputSchema: {
      type: "object",
      properties: {
        maxLoops: {
          type: "number",
          description: "Maximum number of research loops (1-10)"
        },
        llmModel: {
          type: "string",
          description: "Ollama model to use (e.g. llama3.2)"
        },
        searchApi: {
          type: "string",
          enum: ["perplexity", "tavily", "exa"],
          description: "Search API to use for web research"
        }
      },
      required: [],
    },
  • Helper function validateApiKeys used in the configure handler to ensure the required API key is set for the selected searchApi.
    function validateApiKeys(searchApi: string): void {
      if (searchApi === "tavily" && !process.env.TAVILY_API_KEY) {
        throw new Error("TAVILY_API_KEY is required when using Tavily search API");
      }
      if (searchApi === "perplexity" && !process.env.PERPLEXITY_API_KEY) {
        throw new Error("PERPLEXITY_API_KEY is required when using Perplexity search API");
      }
      if (searchApi === "exa" && !process.env.EXA_API_KEY) {
        throw new Error("EXA_API_KEY is required when using Exa search API");
      }
    }
  • Type definition for the ResearchConfig interface used to type the global config state and validate tool inputs.
    interface ResearchConfig {
      maxLoops: number;
      llmModel: string;
      searchApi: "perplexity" | "tavily" | "exa";
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool configures parameters but doesn't explain if this is a one-time setup, if changes persist, what happens to ongoing research, or if it requires specific permissions. For a configuration tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, efficient sentence that directly states the tool's function and enumerates the configurable parameters. It's front-loaded with the core action and wastes no words, making it easy to parse quickly.

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?

Given the complexity of a configuration tool with no annotations and no output schema, the description is insufficient. It doesn't cover behavioral aspects like persistence of settings, effects on sibling tools, or error handling. With 3 parameters and no structured output info, more context is needed for the agent to use this tool effectively.

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?

The description lists the three parameters (max loops, LLM model, search API), which matches the input schema. Since schema description coverage is 100%, the schema already documents each parameter's purpose, constraints, and enums. The description adds no additional semantic context beyond what's in the schema, so it meets the baseline for high coverage.

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 verb ('configure') and the resource ('research parameters'), specifying what the tool does. It lists the three specific parameters that can be configured, making the purpose concrete. However, it doesn't explicitly differentiate from sibling tools like 'get_status' or 'research', which prevents a perfect score.

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 like 'research' or 'get_status'. It doesn't mention prerequisites, such as whether this should be called before starting research, or if it's optional. There's no explicit when/when-not context, leaving usage ambiguous.

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

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/Cam10001110101/mcp-server-ollama-deep-researcher'

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