Skip to main content
Glama

news

Search for recent news articles to gather current information and data using web search capabilities.

Instructions

Search for recent news articles using SearchClaw. Costs 1 credit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesNews search query

Implementation Reference

  • Handler function for 'news' tool - takes query parameter 'q' and makes POST request to /search/news endpoint, returning JSON-formatted results
    async ({ q }) => jsonResult(await apiPost("/search/news", { q }))
  • Input schema for 'news' tool using Zod - defines single required string parameter 'q' (news search query)
    { q: z.string().describe("News search query") },
  • src/index.ts:86-91 (registration)
    Registration of 'news' tool with McpServer - defines tool name, description, input schema, and handler function
    server.tool(
      "news",
      "Search for recent news articles using SearchClaw. Costs 1 credit.",
      { q: z.string().describe("News search query") },
      async ({ q }) => jsonResult(await apiPost("/search/news", { q }))
    );
  • jsonResult helper function - formats API response data into MCP content format with JSON stringification
    function jsonResult(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
  • apiPost helper function - makes POST requests to SearchClaw API with 30s timeout, API key authentication, and error handling
    async function apiPost(path: string, body: Record<string, unknown>) {
      const controller = new AbortController();
      const timeout = setTimeout(() => controller.abort(), 30000);
      try {
        const response = await fetch(`${API_BASE}${path}`, {
          method: "POST",
          headers: { ...headers, "Content-Type": "application/json" },
          body: JSON.stringify(body),
          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);
      }
    }
Behavior3/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 adds valuable context about cost ('Costs 1 credit'), which is a behavioral trait not covered elsewhere. However, it lacks details on rate limits, authentication needs, response format, or pagination behavior, leaving significant gaps for a tool with no annotation coverage.

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 just one sentence that efficiently conveys the core purpose and key behavioral detail (cost). Every word earns its place, with no redundant or unnecessary information.

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?

Given the tool's moderate complexity (a search operation with cost implications), no annotations, and no output schema, the description is somewhat incomplete. It covers the basic purpose and cost but lacks details on return values, error handling, or operational constraints. The description provides a minimum viable explanation but has clear gaps in context.

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' documented as 'News search query'. The description doesn't add any meaning beyond what the schema provides, such as query syntax examples or search scope details. With high schema coverage, the baseline score of 3 is appropriate as the schema handles the parameter documentation adequately.

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 ('recent news articles'), and identifies the service ('using SearchClaw'). It doesn't explicitly distinguish from sibling tools like 'search' or 'search_ai', but the focus on news articles provides some implicit differentiation.

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 implies usage context through 'recent news articles' and the cost information ('Costs 1 credit'), suggesting when this tool might be appropriate. However, it doesn't provide explicit guidance on when to use this versus alternatives like the 'search' or 'search_ai' sibling tools, nor does it mention any exclusions or prerequisites.

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