Skip to main content
Glama

get_rate_limits

Check current API rate limit status to monitor remaining requests and reset times for Lightning Wallet operations.

Instructions

Get current rate limit status - requests remaining and reset time.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool handler for 'get_rate_limits' in src/index.ts.
    case 'get_rate_limits': {
      GetRateLimitsSchema.parse(args);
      const result = await session.requireClient().getRateLimits();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify({
              success: true,
              requests_per_minute: result.requestsPerMinute,
              requests_remaining: result.requestsRemaining,
              reset_at: result.resetAt,
            }, null, 2),
          },
        ],
      };
    }
  • Method implementation in the LightningFaucetClient class.
    async getRateLimits(): Promise<{
      requestsPerMinute: number;
      requestsRemaining: number;
      resetAt: string;
      rawResponse: ApiResponse;
    }> {
      const result = await this.request<ApiResponse & {
        requests_per_minute?: number;
        rate_limit_per_minute?: number;
        requests_remaining?: number;
        reset_at?: string;
      }>('get_rate_limits');
    
      return {
        requestsPerMinute: result.requests_per_minute || result.rate_limit_per_minute || 60,
        requestsRemaining: result.requests_remaining || 60,
        resetAt: result.reset_at || new Date(Date.now() + 60000).toISOString(),
        rawResponse: result,
      };
    }
  • Input validation schema for get_rate_limits.
    const GetRateLimitsSchema = z.object({});
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions retrieving status information, implying a read-only operation, but does not specify if this requires authentication, has rate limits itself, or what the output format might be. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 a single sentence that directly states the tool's purpose without any unnecessary words. Every part of the sentence earns its place by specifying what is being retrieved, making it efficient and well-structured.

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 simplicity (0 parameters, no output schema, no annotations), the description is minimally complete. It states what the tool does but lacks details on behavioral aspects like authentication or output format. For a read-only status tool, this is adequate but leaves clear gaps that could hinder an AI agent's effective use.

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?

The tool has 0 parameters, and the input schema has 100% description coverage (though empty). The description does not need to add parameter semantics, as there are none to explain. A baseline score of 4 is appropriate for tools with no parameters, as the description cannot compensate for missing parameter info.

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 ('Get') and resource ('current rate limit status'), specifying what information is retrieved ('requests remaining and reset time'). However, it does not explicitly differentiate this tool from potential sibling tools that might also retrieve status information, such as 'get_info' or 'get_budget_status', which slightly limits its clarity in context.

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 does not mention any context, prerequisites, or exclusions, such as whether it should be used before making API calls to check limits or as a monitoring tool. With many sibling tools available, this lack of usage guidelines reduces its helpfulness for an AI agent.

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/lightningfaucet/lightning-wallet-mcp'

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