Skip to main content
Glama

get_rate_limit

Monitor GitHub API rate limits with ease using this tool, ensuring your operations stay within usage thresholds and avoid disruptions.

Instructions

Check the current rate limit status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function that executes the 'get_rate_limit' tool by making a request to the GitHub Rate Limit API endpoint and parsing the response with the RateLimitSchema.
    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 schemas for the get_rate_limit tool: base GetRateLimitSchema (empty object) and extended _GetRateLimitSchema that adds the required github_pat field.
    export const GetRateLimitSchema = z.object({}); export const _GetRateLimitSchema = GetRateLimitSchema.extend({ github_pat: z.string().describe("GitHub Personal Access Token"), });
  • Output validation schema (RateLimitSchema) for parsing the GitHub rate limit API response, composed of multiple RateLimitResourceSchema objects.
    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)
    Registration of the 'get_rate_limit' tool in the MCP server's tool list, providing name, description, and input schema reference.
    { name: "get_rate_limit", description: "Check the current rate limit status", inputSchema: zodToJsonSchema(rate_limit.GetRateLimitSchema), },

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