Skip to main content
Glama

research

Utilize this tool to perform in-depth web research by sending queries to You.com's Research API, with optional custom instructions for tailored results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
instructionsNoCustom instructions for tailoring the response (optional)
queryYesThe research query to send to You.com's Research API

Implementation Reference

  • The handler function for the 'research' MCP tool. It invokes youClient.research with the query and optional instructions, formats the result as text content, and handles errors appropriately.
    async ({ query, instructions }: { query: string; instructions?: string }) => {
      try {
        const result = await youClient.research(query, instructions);
        return {
          content: [{ 
            type: "text", 
            text: JSON.stringify(result, null, 2)
          }]
        };
      } catch (error) {
        console.error("Research error:", error);
        return {
          content: [{ 
            type: "text", 
            text: `Error performing research: ${error instanceof Error ? error.message : String(error)}` 
          }],
          isError: true
        };
      }
    }
  • Zod input schema for the 'research' tool defining the required 'query' parameter and optional 'instructions'.
    {
      query: z.string().describe("The research query to send to You.com's Research API"),
      instructions: z.string().optional().describe("Custom instructions for tailoring the response (optional)")
    },
  • src/index.ts:83-109 (registration)
    Registration of the 'research' tool on the MCP server using server.tool(), including schema and handler.
    server.tool(
      "research",
      {
        query: z.string().describe("The research query to send to You.com's Research API"),
        instructions: z.string().optional().describe("Custom instructions for tailoring the response (optional)")
      },
      async ({ query, instructions }: { query: string; instructions?: string }) => {
        try {
          const result = await youClient.research(query, instructions);
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify(result, null, 2)
            }]
          };
        } catch (error) {
          console.error("Research error:", error);
          return {
            content: [{ 
              type: "text", 
              text: `Error performing research: ${error instanceof Error ? error.message : String(error)}` 
            }],
            isError: true
          };
        }
      }
    );
  • Helper method in YouApiClient class that performs the actual API call to You.com's '/research' endpoint, used by the tool handler.
    /**
     * Get a citation-backed response using You.com Research API
     */
    async research(
      query: string, 
      instructions?: string
    ): Promise<ResearchResult> {
      try {
        const params: Record<string, string> = {
          query: query
        };
        
        if (instructions) {
          params.instructions = instructions;
        }
    
        const response = await this.chatClient.get('/research', { params });
        return response.data;
      } catch (error) {
        console.error('Error in You.com research API call:', error);
        throw error;
      }
    }
  • TypeScript interface defining the structure of the response from the You.com Research API.
    interface ResearchResult {
      answer: string;
      citations: Array<{
        url: string;
        title: string;
        content: string;
      }>;
    }
Behavior1/5

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

Tool has no description.

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

Conciseness1/5

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

Tool has no description.

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

Completeness1/5

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

Tool has no description.

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

Parameters1/5

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

Tool has no description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose1/5

Does the description clearly state what the tool does and how it differs from similar tools?

Tool has no description.

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

Usage Guidelines1/5

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

Tool has no description.

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/jimbul/youdotcom_MCP'

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