Skip to main content
Glama

images

Search for images using web queries to find URLs and metadata for visual content discovery.

Instructions

Search for images using SearchClaw. Returns image URLs and metadata. Costs 1 credit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
qYesImage search query

Implementation Reference

  • src/index.ts:93-98 (registration)
    Registration of the 'images' tool using server.tool() with name, description, input schema, and handler function
    server.tool(
      "images",
      "Search for images using SearchClaw. Returns image URLs and metadata. Costs 1 credit.",
      { q: z.string().describe("Image search query") },
      async ({ q }) => jsonResult(await apiPost("/search/images", { q }))
    );
  • Handler function for 'images' tool - takes query parameter 'q' and calls SearchClaw API POST /search/images endpoint
    async ({ q }) => jsonResult(await apiPost("/search/images", { q }))
  • Input schema definition for 'images' tool using Zod - validates that 'q' parameter is a string
    { q: z.string().describe("Image search query") },
  • Helper function that performs POST requests to the SearchClaw API with timeout handling and error management
    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);
      }
    }
  • Helper function that formats API response data into MCP tool result format with JSON stringification
    function jsonResult(data: unknown) {
      return { content: [{ type: "text" as const, text: JSON.stringify(data, null, 2) }] };
    }
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses the cost ('Costs 1 credit'), which is useful behavioral context. However, it lacks details on rate limits, authentication needs, error handling, or what 'metadata' includes. The description adds some value but is incomplete for a search tool.

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: two sentences that directly state the tool's function and cost. Every sentence earns its place with no wasted words, making it efficient and easy to parse.

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 (search with cost), no annotations, and no output schema, the description is minimally adequate. It covers the core purpose and cost but lacks details on output format (beyond 'URLs and metadata'), error cases, or integration context. It's complete enough for basic use but has clear 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 the single parameter 'q' as 'Image search query'. The description adds no additional parameter semantics beyond what the schema provides. 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: 'Search for images using SearchClaw' specifies the verb and resource. It distinguishes from siblings like 'search' or 'search_ai' by focusing on images. However, it doesn't explicitly differentiate from potential image-related siblings (none listed), so it's not a perfect 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 doesn't mention when to choose 'images' over 'search' or 'search_ai', nor does it specify prerequisites or exclusions. The cost mention ('Costs 1 credit') is operational but not usage 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