Skip to main content
Glama

Fetch a GitHub user's contribution calendar and totals

github_get_contributions
Read-onlyIdempotent

Get a GitHub user's contribution graph for a date range of up to one year: the contribution count for each day plus totals for commits, issues, pull requests, reviews and new repositories. Read-only: returns public data and changes nothing. Costs 1 credit per request.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "username": "<username>"
    },
    "name": "github_get_contributions"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoISO-8601 end of the contribution window (inclusive), e.g. "2025-12-31T00:00:00Z". Defaults to now.
fromNoISO-8601 start of the contribution window (inclusive), e.g. "2025-01-01T00:00:00Z". Defaults to one year ago. Must be within one year of `to`.
usernameYesGitHub username (login), or the profile link, e.g. "torvalds" or "https://github.com/torvalds".
cacheOnlyNoReturn only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.
cacheMaxAgeHoursNoAccept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / cacheMaxAgeHours
      Added value: +{
      +  "description": "Accept a cached result scraped up to this many hours ago. A cached result costs no credits, and its `cachedAt` says when it was scraped. When no cached result is that recent, the data is scraped live at the normal price. Leave it out to always scrape live, e.g. 24.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
    • addedInput schema / properties / cacheOnly
      Added value: +{
      +  "description": "Return only a cached result and never scrape live. With `cacheMaxAgeHours`, only a result that recent is returned; without it, the latest cached result of any age. Responds 404, at no cost, when there is none, e.g. true.",
      +  "type": "boolean"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / from / format
      Added value: +"date-time"
    • addedInput schema / properties / to / format
      Added value: +"date-time"
  3. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered; the description still adds real value by disclosing that only public data is returned and that each request costs 1 credit — a quota/cost trait no annotation expresses. The one-year window limit is also behavioral context beyond the annotations. It stops short of describing pagination or failure modes, since those live in the schema.

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?

Three compact sentences: what you get first, safety second, cost last. Every clause carries information — resource, return shape, range limit, read-only status, price — with no restatement of the name and no filler.

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?

With no output schema, the description takes on the job of describing returns and does so concretely (per-day counts plus per-category totals). Cost and data-visibility behavior are covered, and caching semantics live in a fully documented schema. The only missing piece is an explicit pointer to when a sibling tool is the better call.

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%, including the from/to ISO-8601 semantics and the cacheOnly/cacheMaxAgeHours cost tradeoff, so the schema carries the parameter burden. The description reinforces the one-year range but adds no syntax or default details beyond the schema, which is the expected baseline-3 outcome when the schema is this well documented.

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?

"Get a GitHub user's contribution graph" names a specific verb and resource, and the description goes further by enumerating what comes back: per-day counts plus totals for commits, issues, PRs, reviews and new repositories. That distinguishes it from siblings like github_get_profile or the search_* tools by content, though it never names a sibling explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The one-year range cap gives an implied bound on when this tool applies, and the framing around a contribution calendar implies it is the tool for contribution stats. However, there is no explicit statement of when to use this versus github_get_profile or a search tool, and no mention of what it does not cover (e.g., private contributions, org-level data).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources