Skip to main content
Glama
lsd-so
by lsd-so

brave_search

Search the Brave search engine to find relevant web links for research queries, enabling web data extraction through the LSD MCP Server.

Instructions

Search Brave for possibly relevant links to a query

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes

Implementation Reference

  • The inline handler function for the 'brave_search' tool. It takes a query, constructs an LSD scraping script for Brave search results, executes it via runLSD, and formats the extracted links into a text response.
      server.tool("brave_search", "Search Brave for possibly relevant links to a query", { query: z.string() }, async ({ query }) => {
        const result = await runLSD(`FROM https://search.brave.com?search?q=${encodeURIComponent(query)} |> G
    ROUP BY div.snippet |> SELECT a@href AS result_link`);
    
        return {
          content: [{
            type: 'text',
            text: `Here are the results for searching on Brave for: ${query}\n\n${JSON.stringify(result)}`
          }]
        }
      })
  • Zod input schema for the brave_search tool, requiring a 'query' string parameter.
    server.tool("brave_search", "Search Brave for possibly relevant links to a query", { query: z.string() }, async ({ query }) => {
  • src/brave.ts:6-18 (registration)
    The applyBraveTool function that registers the brave_search tool, including its description, schema, and handler, onto the MCP server.
    export const applyBraveTool = (server: McpServer) => {
      server.tool("brave_search", "Search Brave for possibly relevant links to a query", { query: z.string() }, async ({ query }) => {
        const result = await runLSD(`FROM https://search.brave.com?search?q=${encodeURIComponent(query)} |> G
    ROUP BY div.snippet |> SELECT a@href AS result_link`);
    
        return {
          content: [{
            type: 'text',
            text: `Here are the results for searching on Brave for: ${query}\n\n${JSON.stringify(result)}`
          }]
        }
      })
    }
  • src/index.ts:14-14 (registration)
    During server initialization, applyBraveTool is called to register the brave_search tool.
    applyBraveTool(server);
  • Helper function runLSD used by the brave_search handler to execute LSD (likely 'Liquid Scrape Data') code using the 'internetdata' library's drop.tab() for web scraping.
    export const runLSD = async (
      code: string,
    ): Promise<Array<Record<string, any>>> => {
      const trip = await drop.tab();
      const results = await trip.execute(code);
      return results;
    };
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool searches for 'possibly relevant links,' which implies it's a read-only operation that returns search results, but doesn't disclose critical behaviors like rate limits, authentication needs, result format, pagination, or error handling. For a search tool with zero annotation coverage, this is insufficient.

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 extremely concise and front-loaded, consisting of a single sentence that directly states the tool's function. Every word earns its place with no wasted information, making it easy for an agent to parse quickly.

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

Completeness2/5

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

Given the tool's complexity (a search operation with no output schema and no annotations), the description is incomplete. It lacks details on result structure, error cases, performance characteristics, or any behavioral context needed for effective use. The description alone doesn't provide enough information for reliable tool invocation.

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?

The description adds minimal meaning beyond the input schema. It implies the 'query' parameter is used to search Brave, but with 0% schema description coverage and only one parameter, the baseline is 4 for zero parameters; however, since there is one parameter and the description doesn't elaborate on its format, constraints, or examples, it doesn't fully compensate, warranting a score of 3.

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 with a specific verb ('Search') and resource ('Brave'), and identifies the output ('links to a query'). It distinguishes the tool's function from its siblings (find_trips, run_lsd) by focusing on web search. However, it doesn't explicitly differentiate from potential alternative search tools, keeping it at a 4 rather than a 5.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions 'possibly relevant links' but gives no context about when this search method is preferred over others, what types of queries it handles best, or any prerequisites for use. This leaves the agent without usage direction.

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

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/lsd-so/internetdata-mcp'

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