Skip to main content
Glama
ClawyPro

Clawy MCP Server

by ClawyPro

brave_search

Perform web searches through the Brave Search API to retrieve structured results including titles, URLs, and descriptions while maintaining privacy with no tracking.

Instructions

Web search via Brave Search API. Returns structured results with titles, URLs, descriptions, and snippets. Privacy-focused, no tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query
countNoNumber of results (default 10, max 20)
countryNoCountry code for localized results (e.g., KR, JP, US)
search_langNoLanguage code (e.g., ko, ja, en)
freshnessNoFreshness filter: pd=past day, pw=past week, pm=past month, py=past year

Implementation Reference

  • The tool 'brave_search' is defined in the tools registry within src/tools/brave.ts. It is dynamically registered in src/index.ts using this configuration.
    export const braveTools: ToolDef[] = [
      {
        name: "brave_search",
        description: "Web search via Brave Search API. Returns structured results with titles, URLs, descriptions, and snippets. Privacy-focused, no tracking.",
        inputSchema: z.object({
          q: z.string().describe("Search query"),
          count: z.number().optional().describe("Number of results (default 10, max 20)"),
          country: z.string().optional().describe("Country code for localized results (e.g., KR, JP, US)"),
          search_lang: z.string().optional().describe("Language code (e.g., ko, ja, en)"),
          freshness: z.enum(["pd", "pw", "pm", "py"]).optional()
            .describe("Freshness filter: pd=past day, pw=past week, pm=past month, py=past year"),
        }),
        endpoint: "/v1/brave/search",
      },
    ];
  • The handler for 'brave_search' is dynamically constructed in src/index.ts. It executes a network request to the gateway using the tool's defined endpoint '/v1/brave/search'.
    for (const tool of allTools) {
      server.tool(
        tool.name,
        tool.description,
        tool.inputSchema.shape,
        async (params) => {
          const method = tool.method || "POST";
          const result = await gatewayRequest(method, tool.endpoint, params as Record<string, unknown>);
    
          if (result.error) {
            return {
              content: [{ type: "text" as const, text: `Error (${result.status}): ${result.error}` }],
              isError: true,
            };
          }
    
          const text = typeof result.data === "string"
            ? result.data
            : JSON.stringify(result.data, null, 2);
    
          return {
            content: [{ type: "text" as const, text }],
          };
        },
      );

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/ClawyPro/clawy-mcp-server'

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