Skip to main content
Glama

ai_trend

Read-onlyIdempotent

Track how much code each AI agent versus humans added per week or month. Reveals when AI use changed, which agents contribute, and historical trends from git history.

Instructions

Show how much of the code added over time was written by each AI agent versus people, per week or month.

When to use: the user asks how AI use has changed, which agents write the most code, or since when. For
today's totals use repo_status. Counts lines added in commits (from git log), attributed to an AI agent when
the commit carries its marker, e.g. a Co-Authored-By: Claude trailer or a Copilot bot author.

Returns {"by", "summary": {"human", "ai", "ai_pct", "tools" (lines per agent)},
"periods": [{"start", "human", "tools"}]}, oldest period first.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "ai_trend"
  }
}

Input Schema

NameRequiredDescriptionDefault
byNoBucket size.auto
repoNoPath inside the git repository. Defaults to the server's working directory.
sinceNoOnly commits after this date, e.g. '2026-01-01' or '6 months ago'.

Output Schema

NameRequiredDescriptionDefault
byYesweek or month.
periodsYesOldest first.
summaryYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.4.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$defs": {
      +    "TrendPeriod": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "human": {
      +          "title": "Human",
      +          "type": "integer"
      +        },
      +        "start": {
      +          "description": "First day of the week or month (ISO date).",
      +          "title": "Start",
      +          "type": "string"
      +        },
      +        "tools": {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "description": "AI agent -> lines added in this period.",
      +          "title": "Tools",
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "start",
      +        "human",
      +        "tools"
      +      ],
      +      "title": "TrendPeriod",
      +      "type": "object"
      +    },
      +    "TrendSummary": {
      +      "additionalProperties": true,
      +      "properties": {
      +        "ai": {
      +          "title": "Ai",
      +          "type": "integer"
      +        },
      +        "ai_pct": {
      +          "title": "Ai Pct",
      +          "type": "number"
      +        },
      +        "human": {
      +          "title": "Human",
      +          "type": "integer"
      +        },
      +        "tools": {
      +          "additionalProperties": {
      +            "type": "integer"
      +          },
      +          "description": "AI agent -> lines added over the whole range.",
      +          "title": "Tools",
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "human",
      +        "ai",
      +        "ai_pct",
      +        "tools"
      +      ],
      +      "title": "TrendSummary",
      +      "type": "object"
      +    }
      +  },
      +  "additionalProperties": true,
      +  "properties": {
      +    "by": {
      +      "description": "week or month.",
      +      "title": "By",
      +      "type": "string"
      +    },
      +    "periods": {
      +      "description": "Oldest first.",
      +      "items": {
      +        "$ref": "#/$defs/TrendPeriod"
      +      },
      +      "title": "Periods",
      +      "type": "array"
      +    },
      +    "summary": {
      +      "$ref": "#/$defs/TrendSummary"
      +    }
      +  },
      +  "required": [
      +    "by",
      +    "summary",
      +    "periods"
      +  ],
      +  "title": "AiTrend",
      +  "type": "object"
      +}
  2. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive and closed-world, so the safety bar is low, but the description adds genuinely useful method: counts come from git log lines added in commits, attributed via agent markers such as a Co-Authored-By trailer or Copilot bot author. What it does not do is warn about the obvious failure mode of that heuristic (unmarked AI-assisted commits counted as human), which is the one behavioral caveat an agent would want before presenting these numbers as truth.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the purpose, then a labeled when-to-use line, then the attribution rule, then the return shape — easy to scan with no filler sentences. The returns line largely restates the output schema, which is the only real duplication.

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

Completeness5/5

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

Covers what is measured, the data source, the attribution heuristic, when to prefer the sibling, and the response shape, on top of annotations and a full output schema. Nothing an agent needs in order to call it or interpret the result is missing.

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?

All three parameters are fully documented in the schema at 100% coverage, so the schema already carries the burden. The description implies the week/month bucketing and that periods are returned oldest-first, but it does not explain the "auto" enum value or the date syntax for since beyond what the schema states. Baseline 3 is appropriate.

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?

States a specific verb and resource: shows the share of added code authored by each AI agent versus humans, bucketed by week or month. It also distinguishes itself from repo_status by scoping that tool to today's totals, so an agent can route between them without opening either schema.

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

Usage Guidelines5/5

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

Explicit "When to use" clause names the user intents (how AI use changed, which agents write most, since when) and names the alternative repo_status for today's totals. Both the positive and negative selection conditions are present.

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