Skip to main content
Glama

search

Search the web using Brave Search API to retrieve structured results including titles, URLs, and descriptions without scraping pages directly.

Instructions

Search the web using Brave Search API — fast, reliable, no rate limits. Returns titles, URLs, and descriptions as structured JSON without scraping the pages.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesThe search query
countNoNumber of results (1-20, default 5)
contextNoOptional: what you're trying to accomplish. Helps with result relevance.

Implementation Reference

  • The registration and handler implementation for the "search" tool in the mcp-server. It calls a remote API endpoint and formats the response.
    server.tool(
      "search",
      "Search Google and return structured results (title, URL, snippet). Does not scrape the pages.",
      {
        query: z.string().describe("Search query"),
        maxResults: z
          .number()
          .int()
          .min(1)
          .max(20)
          .optional()
          .describe("Max results to return (default: 5, max: 20)"),
      },
      async ({ query, maxResults }) => {
        const data = await callApi("/search", { query, maxResults });
        const results = data.results || [];
        const formatted = results
          .map((r, i) => `${i + 1}. **${r.title}**\n   ${r.url}\n   ${r.snippet}`)
          .join("\n\n");
        return {
          content: [
            {
              type: "text" as const,
              text: formatted || "No results found.",
            },
          ],
        };
      }
    );
Behavior4/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 effectively adds context beyond basic functionality: it specifies the API used (Brave Search), performance traits ('fast, reliable'), operational limits ('no rate limits'), and output format ('structured JSON without scraping'). This covers key behavioral aspects like reliability and constraints, though it lacks details on error handling or authentication needs.

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: it starts with the core purpose, then adds key behavioral traits and output format in a single, efficient sentence. Every phrase earns its place with no wasted words, making it highly concise and well-structured.

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 (3 parameters, no output schema, no annotations), the description is mostly complete: it covers purpose, behavioral traits, and output format. However, it lacks details on error cases or response structure (e.g., what fields are in the JSON), which would be helpful since there's no output schema. It compensates well but has minor gaps.

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 documents all parameters (q, count, context) thoroughly. The description does not add any meaning beyond what the schema provides (e.g., it doesn't explain parameter interactions or provide examples). Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Search the web'), identifies the resource ('using Brave Search API'), and distinguishes it from siblings by specifying it returns structured JSON without scraping (unlike batch_scrape, crawl, extract, or scrape which likely involve scraping). The verb+resource+differentiation is explicit.

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 this tool ('Search the web... fast, reliable, no rate limits') and implies an alternative by noting it returns structured JSON 'without scraping the pages' (suggesting siblings like scrape might involve scraping). However, it does not explicitly state when-not-to-use or name specific alternatives, keeping it at a 4.

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/kc23go/anybrowse'

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