Skip to main content
Glama

usage

Check your SearchClaw API credit balance to monitor usage and manage costs for web search, extraction, and crawling operations.

Instructions

Check your SearchClaw API credit balance. Costs 0 credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:224-229 (registration)
    Registration of the 'usage' tool with MCP server. The tool takes no parameters and calls the /usage API endpoint to check credit balance.
    server.tool(
      "usage",
      "Check your SearchClaw API credit balance. Costs 0 credits.",
      {},
      async () => jsonResult(await apiGet("/usage"))
    );
  • Handler function that makes HTTP GET requests to the SearchClaw API. This is called by the usage tool to fetch credit balance data from /usage endpoint.
    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 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) }] };
    }
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 communicates that this is a read operation ('Check') and importantly reveals the cost implication ('Costs 0 credits'), which is valuable behavioral information not captured elsewhere. It doesn't mention rate limits, authentication requirements, or error conditions, leaving some behavioral aspects uncovered.

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 perfectly concise at just two short sentences that each earn their place. The first sentence states the core purpose, and the second adds crucial behavioral information about cost. There's zero wasted verbiage or redundancy.

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?

For a simple 0-parameter tool with no annotations and no output schema, the description provides good coverage of what the tool does and its cost implication. However, it doesn't describe what the return value looks like (e.g., current balance, remaining credits, etc.), which would be helpful given the lack of output schema. The description is mostly complete but could benefit from a hint about the response format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0 parameters and 100% schema description coverage, the baseline would be 4. The description appropriately doesn't discuss parameters since none exist, which is correct. No additional parameter semantics are needed or provided.

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 ('Check') and resource ('SearchClaw API credit balance'), making the purpose immediately understandable. It distinguishes itself from sibling tools like 'search', 'crawl', or 'extract' by focusing on account/credit status rather than content retrieval or processing operations.

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 about when to use this tool - specifically to check API credit balance. However, it doesn't explicitly mention when NOT to use it or name alternative tools for related functions (like checking usage history or billing details), which prevents a perfect score.

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