Skip to main content
Glama

get_rate_limit

Check GitHub API rate limit status to monitor usage and prevent hitting request caps.

Instructions

Check the current rate limit status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core handler function that makes the GitHub API request to retrieve rate limit information and parses the response using the defined schema.
    export async function getRateLimit(
      github_pat: string
    ): Promise<z.infer<typeof RateLimitSchema>> {
      const response = await githubRequest(
        github_pat,
        "https://api.github.com/rate_limit"
      );
      return RateLimitSchema.parse(response);
    }
  • Input schema definitions for the get_rate_limit tool, including the public schema and internal extended schema with github_pat.
    export const GetRateLimitSchema = z.object({});
    
    export const _GetRateLimitSchema = GetRateLimitSchema.extend({
      github_pat: z.string().describe("GitHub Personal Access Token"),
    });
  • Output schema definitions for parsing the GitHub rate limit API response.
    export const RateLimitResourceSchema = z.object({
      limit: z.number(),
      used: z.number(),
      remaining: z.number(),
      reset: z.number(),
    });
    
    export const RateLimitSchema = z.object({
      resources: z.object({
        core: RateLimitResourceSchema,
        search: RateLimitResourceSchema,
        graphql: RateLimitResourceSchema,
        integration_manifest: RateLimitResourceSchema,
        code_scanning_upload: RateLimitResourceSchema,
        actions_runner_registration: RateLimitResourceSchema,
        scim: RateLimitResourceSchema,
        dependency_snapshots: RateLimitResourceSchema,
      }),
      rate: RateLimitResourceSchema,
    });
  • src/index.ts:227-231 (registration)
    Tool registration in the MCP server's list of available tools.
    {
      name: "get_rate_limit",
      description: "Check the current rate limit status",
      inputSchema: zodToJsonSchema(rate_limit.GetRateLimitSchema),
    },
  • Dispatch handler in the main CallToolRequest handler that validates input and delegates to the rate_limit.getRateLimit function.
    case "get_rate_limit": {
      const args = rate_limit._GetRateLimitSchema.parse(params.arguments);
      const result = await rate_limit.getRateLimit(args.github_pat);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
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. It mentions 'Check' which implies a read operation, but doesn't disclose behavioral traits like authentication needs, rate limits on this call itself, response format, or whether it's safe to use frequently. This leaves key operational details unclear.

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 a single, clear sentence with zero waste. It's front-loaded and efficiently communicates the core purpose without any fluff or redundancy.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what the rate limit status includes (e.g., remaining calls, reset time), how it's returned, or any error conditions. For a tool that likely returns structured data about API limits, this is insufficient.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, earning a high baseline score for not adding unnecessary information.

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 verb ('Check') and resource ('current rate limit status'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools, as none appear to be rate-limit related, so this is adequate but not exceptional.

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, prerequisites, or context. It's a standalone statement without any usage context, which is a significant gap for effective tool selection.

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/MissionSquad/mcp-github'

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