Skip to main content
Glama
DaInfernalCoder

MCP-researcher Server

deep_research

Conducts in-depth analysis and generates detailed research reports on complex topics using advanced AI models for comprehensive investigation.

Instructions

Conducts in-depth analysis and generates detailed reports using Perplexity's Sonar Deep Research model. Best for comprehensive research topics.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe research topic or question to investigate in depth. IMPORTANT: Be extremely specific and include all relevant details: - Include exact error messages, logs, and stack traces if applicable - Provide exact terminology, function names, API names, version numbers - Include relevant code snippets showing the problem or context - Specify platform, OS, framework versions, and environment details - Mention any attempted solutions or workarounds - Provide context about what you're trying to achieve - Include relevant data structures, configurations, or inputs - Specify the scope, constraints, or specific requirements The more specific details you include, the more accurate and helpful the answer will be. If you don't have enough specific information, prompt the user to provide it before using this tool.
focus_areasNoOptional: Specific aspects or areas to focus on
force_modelNoOptional: Force using this model even if query seems simple

Implementation Reference

  • Executes the deep_research tool by selecting the 'sonar-deep-research' model, extracting optional focus_areas, and constructing a comprehensive research prompt tailored to the query and details provided.
              case "deep_research": {
                model = "sonar-deep-research";
                const { focus_areas = [] } = request.params.arguments as { focus_areas?: string[] };
    
                prompt = `You are answering a research query that contains specific details like error messages, logs, code snippets, exact terminology, version numbers, and context. Use all provided details to conduct the most accurate and comprehensive research.
    
    Research Query: ${query}`;
    
                if (focus_areas.length > 0) {
                  prompt += `\n\nFocus areas:\n${focus_areas.map((area, i) => `${i + 1}. ${area}`).join('\n')}`;
                }
    
                prompt += `\n\nProvide a detailed analysis that:
    1. Incorporates and addresses all specific details provided (errors, logs, code, versions, configurations, etc.)
    2. Provides background and context relevant to the specific scenario described
    3. Defines key concepts and terminology matching the exact terms used
    4. Presents the current state of knowledge relevant to the specific problem or topic
    5. Explores different perspectives applicable to the described situation
    6. Covers recent developments that relate to the specific details provided
    7. Discusses practical applications relevant to the exact context
    8. Identifies challenges and limitations specific to the scenario
    9. Suggests future directions or solutions based on the specific details
    10. Includes expert opinions and references to sources that address the specific issue
    11. Tailors all recommendations to the exact technical context, versions, and environment described`;
                break;
  • Input schema for the deep_research tool, defining a required 'query' string parameter with detailed description, optional 'focus_areas' array of strings, and optional 'force_model' boolean.
    inputSchema: {
      type: "object",
      properties: {
        query: {
          type: "string",
          description: "The research topic or question to investigate in depth. IMPORTANT: Be extremely specific and include all relevant details:\n- Include exact error messages, logs, and stack traces if applicable\n- Provide exact terminology, function names, API names, version numbers\n- Include relevant code snippets showing the problem or context\n- Specify platform, OS, framework versions, and environment details\n- Mention any attempted solutions or workarounds\n- Provide context about what you're trying to achieve\n- Include relevant data structures, configurations, or inputs\n- Specify the scope, constraints, or specific requirements\n\nThe more specific details you include, the more accurate and helpful the answer will be.\nIf you don't have enough specific information, prompt the user to provide it before using this tool."
        },
        focus_areas: {
          type: "array",
          items: {
            type: "string"
          },
          description: "Optional: Specific aspects or areas to focus on"
        },
        force_model: {
          type: "boolean",
          description: "Optional: Force using this model even if query seems simple",
          default: false
        }
      },
      required: ["query"]
    }
  • src/index.ts:301-326 (registration)
    Registers the deep_research tool in the MCP ListTools response, providing name, description, and input schema.
    {
      name: "deep_research",
      description: "Conducts in-depth analysis and generates detailed reports using Perplexity's Sonar Deep Research model. Best for comprehensive research topics.",
      inputSchema: {
        type: "object",
        properties: {
          query: {
            type: "string",
            description: "The research topic or question to investigate in depth. IMPORTANT: Be extremely specific and include all relevant details:\n- Include exact error messages, logs, and stack traces if applicable\n- Provide exact terminology, function names, API names, version numbers\n- Include relevant code snippets showing the problem or context\n- Specify platform, OS, framework versions, and environment details\n- Mention any attempted solutions or workarounds\n- Provide context about what you're trying to achieve\n- Include relevant data structures, configurations, or inputs\n- Specify the scope, constraints, or specific requirements\n\nThe more specific details you include, the more accurate and helpful the answer will be.\nIf you don't have enough specific information, prompt the user to provide it before using this tool."
          },
          focus_areas: {
            type: "array",
            items: {
              type: "string"
            },
            description: "Optional: Specific aspects or areas to focus on"
          },
          force_model: {
            type: "boolean",
            description: "Optional: Force using this model even if query seems simple",
            default: false
          }
        },
        required: ["query"]
      }
    }
  • Helper method that classifies query complexity as 'research' based on keywords, enabling automatic selection of the deep_research tool when a 'search' tool call matches research patterns.
    private determineQueryComplexity(query: string): "simple" | "complex" | "research" {
      // Check for research indicators
      const researchIndicators = [
        "analyze", "research", "investigate", "study", "examine", "explore",
        "comprehensive", "detailed", "in-depth", "thorough",
        "compare and contrast", "evaluate", "assess"
      ];
    
      // Check for complex reasoning indicators
      const complexIndicators = [
        "how", "why", "what if", "explain", "solve", "steps to",
        "difference between", "compare", "which is better",
        "pros and cons", "advantages", "disadvantages"
      ];
    
      const query_lower = query.toLowerCase();
    
      // Check for research patterns
      if (researchIndicators.some(indicator => query_lower.includes(indicator))) {
        return "research";
      }
    
      // Check for complex patterns
      if (complexIndicators.some(indicator => query_lower.includes(indicator))) {
        return "complex";
      }
    
      // Default to simple if no complex/research patterns found
      return "simple";
    }
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 mentions the tool uses 'Perplexity's Sonar Deep Research model' and is for 'comprehensive research topics,' but it lacks details on behavioral traits such as response format, potential rate limits, authentication needs, or whether it's a read-only or mutative operation. The description doesn't contradict annotations, but it's insufficient for a tool with no annotation coverage.

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

Conciseness4/5

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

The description is appropriately sized and front-loaded, consisting of two concise sentences that directly state the tool's purpose and usage context. There's no wasted text, and it efficiently conveys key information without unnecessary elaboration.

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

Completeness3/5

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

Given the tool's complexity (3 parameters, no annotations, no output schema), the description is moderately complete. It covers the purpose and hints at usage but lacks details on behavioral traits, output format, and differentiation from siblings. The high schema coverage helps, but for a research tool with no output schema, more context on what to expect from results would be beneficial.

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 schema description coverage is 100%, so the input schema already documents all parameters thoroughly. The description adds no additional meaning beyond what the schema provides—it doesn't explain parameter interactions or usage nuances. With high schema coverage, the baseline score is 3, as the description doesn't compensate but also doesn't detract.

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: 'Conducts in-depth analysis and generates detailed reports using Perplexity's Sonar Deep Research model.' It specifies the verb ('conducts analysis and generates reports'), resource ('Perplexity's Sonar Deep Research model'), and scope ('comprehensive research topics'). However, it doesn't explicitly differentiate from sibling tools 'reason' and 'search' beyond mentioning it's 'best for comprehensive research topics,' which is somewhat vague.

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

Usage Guidelines3/5

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

The description provides some guidance: 'Best for comprehensive research topics.' This implies usage for complex or broad inquiries, but it doesn't explicitly state when to use this tool versus alternatives like 'reason' or 'search,' nor does it mention any exclusions or prerequisites. The input schema hints at usage context by emphasizing specificity, but this isn't part of the description itself.

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/DaInfernalCoder/perplexity-mcp'

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