Skip to main content
Glama

smart_search

Search the web, retrieve news, and conduct research using query-based inputs, with optional custom instructions and conversation continuity for tailored results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
conversationIdNoA hex UUID to maintain conversation continuity (optional)
instructionsNoCustom instructions for tailoring the response (optional)
queryYesThe query to send to You.com's Smart API

Implementation Reference

  • src/index.ts:53-80 (registration)
    MCP server registration for the 'smart_search' tool, including Zod input schema, error-handling wrapper, and delegation to YouApiClient.smartSearch
    server.tool(
      "smart_search",
      {
        query: z.string().describe("The query to send to You.com's Smart API"),
        instructions: z.string().optional().describe("Custom instructions for tailoring the response (optional)"),
        conversationId: z.string().optional().describe("A hex UUID to maintain conversation continuity (optional)")
      },
      async ({ query, instructions, conversationId }: { query: string; instructions?: string; conversationId?: string }) => {
        try {
          const result = await youClient.smartSearch(query, instructions, conversationId);
          return {
            content: [{ 
              type: "text", 
              text: JSON.stringify(result, null, 2)
            }]
          };
        } catch (error) {
          console.error("Smart search error:", error);
          return {
            content: [{ 
              type: "text", 
              text: `Error performing smart search: ${error instanceof Error ? error.message : String(error)}` 
            }],
            isError: true
          };
        }
      }
    );
  • Core handler function in YouApiClient that performs the actual HTTP request to You.com's '/smart' API endpoint for AI-powered search
    async smartSearch(
      query: string, 
      instructions?: string, 
      conversationId?: string
    ): Promise<SmartResult> {
      try {
        const params: Record<string, string> = {
          query: query
        };
        
        if (instructions) {
          params.instructions = instructions;
        }
        
        if (conversationId) {
          params.conversation_id = conversationId;
        }
    
        const response = await this.chatClient.get('/smart', { params });
        return response.data;
      } catch (error) {
        console.error('Error in You.com smart API call:', error);
        throw error;
      }
    }
  • TypeScript interface defining the expected output structure of the smartSearch API response
    interface SmartResult {
      answer: string;
      results: Array<{
        url: string;
        title: string;
        snippet: string;
      }>;
    }
  • Zod schema defining the input parameters for the smart_search MCP tool
      query: z.string().describe("The query to send to You.com's Smart API"),
      instructions: z.string().optional().describe("Custom instructions for tailoring the response (optional)"),
      conversationId: z.string().optional().describe("A hex UUID to maintain conversation continuity (optional)")
    },
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