Skip to main content
Glama

search

Perform web searches to find relevant information using SearchClaw's API. This tool retrieves organic search results for any query to support research and data gathering tasks.

Instructions

Search the web using SearchClaw. Returns organic web results. Costs 1 credit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesSearch query

Implementation Reference

  • The 'search' tool handler that takes a query parameter 'q' and returns organic web search results from the SearchClaw API via GET request to /search endpoint
    server.tool(
      "search",
      "Search the web using SearchClaw. Returns organic web results. Costs 1 credit.",
      { q: z.string().describe("Search query") },
      async ({ q }) => jsonResult(await apiGet("/search", { q }))
    );
  • Input schema for the 'search' tool - accepts a single string parameter 'q' representing the search query
    { q: z.string().describe("Search query") },
  • src/index.ts:72-77 (registration)
    Registration of the 'search' tool with the MCP server using server.tool() method
    server.tool(
      "search",
      "Search the web using SearchClaw. Returns organic web results. Costs 1 credit.",
      { q: z.string().describe("Search query") },
      async ({ q }) => jsonResult(await apiGet("/search", { q }))
    );
  • Helper function for making GET requests to the SearchClaw API with query parameters, timeout handling, and error management
    async function apiGet(path: string, params?: Record<string, string>) {
      const url = new URL(`${API_BASE}${path}`);
      if (params) {
        for (const [key, value] of Object.entries(params)) {
          url.searchParams.set(key, value);
        }
      }
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), 30000);
      try {
        const response = await fetch(url.toString(), { headers, signal: controller.signal });
        if (!response.ok) {
          const text = await response.text();
          throw new Error(`SearchClaw API error ${response.status}: ${text}`);
        }
        return response.json();
      } finally {
        clearTimeout(timeout);
      }
    }
  • Helper function to format API response data as MCP tool result with JSON formatting
    function jsonResult(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
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 successfully reveals key behavioral traits: the tool performs web searches, returns organic results (not ads or other content types), and has a cost implication (1 credit per use). This covers the core operational behavior, though it doesn't mention rate limits, authentication needs, or error handling.

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 well-structured in a single sentence that efficiently communicates purpose, result type, and cost. Every word earns its place with zero redundancy or wasted verbiage.

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

Completeness3/5

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

For a search tool with one parameter, 100% schema coverage, and no output schema, the description provides adequate but minimal context. It covers what the tool does and cost implications, but doesn't explain result format, pagination, error cases, or how it differs from sibling tools like 'search_ai'. Given the simplicity of the tool, this is minimally viable but leaves 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?

The schema description coverage is 100%, with the single parameter 'q' clearly documented as 'Search query'. The description doesn't add any additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 for high schema coverage without compensating value.

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: 'Search the web using SearchClaw' with the specific action 'search' and resource 'web'. It distinguishes from some siblings like 'images' or 'news' by specifying 'organic web results', but doesn't explicitly differentiate from 'search_ai' which appears to be a similar search tool.

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

Usage Guidelines3/5

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

The description provides some usage context by mentioning 'Costs 1 credit', which implies resource constraints, and 'Returns organic web results' which clarifies the type of results. However, it doesn't explicitly state when to use this tool versus alternatives like 'search_ai' or 'browse', nor does it provide clear when-not-to-use guidance.

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/CSteenkamp/searchclaw-mcp'

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