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; }>; }

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