Skip to main content
Glama
mikechao

Brave Search MCP

brave_news_search

Search for news articles on recent events, trending topics, or specific stories using Brave Search API. Retrieve up to 20 results with titles, URLs, and descriptions per request.

Instructions

Searches for news articles using the Brave Search API. Use this for recent events, trending topics, or specific news stories. Returns a list of articles with titles, URLs, and descriptions. Maximum 20 results per request.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoThe number of results to return, minimum 1, maximum 20
queryYesThe term to search the internet for news articles, trending topics, or recent events

Implementation Reference

  • The executeCore method implements the core logic of the brave_news_search tool, performing the news search using BraveSearch API, handling no results, and formatting the output as text with title, URL, age, and description for each result.
    public async executeCore(input: z.infer<typeof newsSearchInputSchema>) {
      const { query, count, freshness } = input;
      const newsResult = await this.braveSearch.newsSearch(query, {
        count,
        ...(freshness ? { freshness } : {}),
      });
      if (!newsResult.results || newsResult.results.length === 0) {
        this.braveMcpServer.log(`No news results found for "${query}"`);
        const text = `No news results found for "${query}"`;
        return { content: [{ type: 'text' as const, text }] };
      }
    
      const text = newsResult.results
        .map(result =>
          `Title: ${result.title}\n`
          + `URL: ${result.url}\n`
          + `Age: ${result.age}\n`
          + `Description: ${result.description}\n`,
        )
        .join('\n\n');
      return { content: [{ type: 'text' as const, text }] };
    }
  • Zod input schema for brave_news_search tool defining parameters: query (string), count (number 1-20, default 10), freshness (enum or date range string).
    const newsSearchInputSchema = z.object({
      query: z.string().describe('The term to search the internet for news articles, trending topics, or recent events'),
      count: z.number().min(1).max(20).default(10).optional().describe('The number of results to return, minimum 1, maximum 20'),
      freshness: z.union([
        z.enum(['pd', 'pw', 'pm', 'py']),
        z.string().regex(/^\d{4}-\d{2}-\d{2}to\d{4}-\d{2}-\d{2}$/, 'Date range must be in format YYYY-MM-DDtoYYYY-MM-DD')
      ])
        .optional()
        .describe(
          `Filters search results by when they were discovered.
    The following values are supported:
    - pd: Discovered within the last 24 hours.
    - pw: Discovered within the last 7 Days.
    - pm: Discovered within the last 31 Days.
    - py: Discovered within the last 365 Days.
    - YYYY-MM-DDtoYYYY-MM-DD: Custom date range (e.g., 2022-04-01to2022-07-30)`,
        ),
    });
  • src/server.ts:64-69 (registration)
    Registers the brave_news_search tool instance with the MCP server by calling server.tool() with name, description, input schema, and bound execute method.
    this.server.tool(
      this.newsSearchTool.name,
      this.newsSearchTool.description,
      this.newsSearchTool.inputSchema.shape,
      this.newsSearchTool.execute.bind(this.newsSearchTool),
    );
Behavior3/5

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

With no annotations provided, the description carries full burden. It discloses key behavioral traits: 'Returns a list of articles with titles, URLs, and descriptions' (output format) and 'Maximum 20 results per request' (rate/limit constraint). However, it doesn't mention authentication needs, error handling, pagination, or whether results are cached/fresh. For a search tool with zero annotation coverage, this is adequate but leaves gaps.

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

Conciseness5/5

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

The description is appropriately sized and front-loaded: first sentence states purpose, second gives usage context, third describes output, fourth sets constraints. Every sentence earns its place with no wasted words. It efficiently conveys essential information in four concise sentences.

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

Completeness4/5

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

Given the tool's moderate complexity (search with parameters), 100% schema coverage, no annotations, and no output schema, the description is reasonably complete. It covers purpose, usage context, output format, and a key constraint. However, without an output schema, it could benefit from more detail on the article structure (e.g., publication date, source) or error scenarios.

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?

Schema description coverage is 100%, so the schema already fully documents both parameters (query and count). The description adds no additional parameter semantics beyond what's in the schema. It mentions 'Maximum 20 results per request' which aligns with the schema's count maximum, but doesn't provide new syntax or format details. Baseline 3 is appropriate when schema does the heavy lifting.

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: 'Searches for news articles using the Brave Search API' (verb+resource). It distinguishes from siblings by specifying 'news articles' rather than images, local results, videos, or general web content. However, it doesn't explicitly contrast with siblings like 'Use this instead of brave_web_search for news-specific results'.

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

Usage Guidelines4/5

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

The description provides clear context for when to use: 'for recent events, trending topics, or specific news stories.' This gives practical guidance. However, it doesn't explicitly state when NOT to use this tool or name alternatives among the sibling tools (e.g., 'Use brave_web_search for general web results instead').

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/mikechao/brave-search-mcp'

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