Skip to main content
Glama

Get created pull requests

get-created-pull-requests-tool
Read-onlyIdempotent

Count pull requests OPENED over a recent window (default 1 day), broken down per repository and per author, with a human-vs-bot/dependabot split. Use this whenever the question is how many pull requests were created, opened or raised — today, this week, on a repo, or across the team — and especially when someone asks to see it "per repo" or "by repository".

Prefer this over a per-person activity breakdown for any total. It counts from the team's repositories rather than its member list, so it includes authors who have no Coderbuds account (reported as authors_without_member and created_by_non_members) and excludes a member's work in repositories this team does not ship. A member-first count gets both of those wrong.

The result carries its own denominator: repositories is exactly the list the numbers came from, so you can answer "which repos is this based on" from the same call. Slugs that match no team repository come back in unmatched_repositories instead of quietly counting zero.

Opened is counted by the time the provider recorded the pull request being opened. That is a different set from merged in the window — use get-merged-pull-requests-tool for merges, and never present the two as reconciling.

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": "get-created-pull-requests-tool"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoLook-back window in days, trailing from now. Defaults to 1 — note that is the last 24 hours, not today's calendar day.
include_botsNoWhether to include bot/dependabot PRs in the totals. Defaults to true; the result always reports the human-vs-bot split regardless.
repositoriesNoOptional list of "owner/name" repository slugs to scope to (e.g. ["patchstack/saas"]). A bare repo name like "saas" also matches. Omit to include every repository on the team.

Output Schema

NameRequiredDescriptionDefault
daysYesLook-back window used, in days.
teamYesTeam name.
sinceYesISO-8601 start of the window.
untilYesISO-8601 end of the window.
authorsYesPer-author counts with is_bot and is_member flags.
counted_asYesWhat "created" means in this result, to quote when reporting it.
bot_createdYesPRs opened by bots (any "[bot]" login).
not_capturedYesLimits of this result, to repeat when reporting the numbers.
repositoriesYesRepository slugs the numbers came from — the denominator for the whole result.
human_createdYesPRs opened by humans.
total_createdYesTotal PRs opened in the window (respects include_bots).
dependabot_createdYesPRs opened by dependabot specifically.
authors_without_memberYesHuman authors with no Coderbuds membership on this team — people a per-person breakdown would have omitted entirely.
created_by_non_membersYesPRs those non-member humans opened.
repositories_breakdownYesPer-repository totals with human/bot split, highest first.
unmatched_repositoriesYesRequested slugs that did not match a team repository.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnly/idempotent annotations, it discloses non-obvious counting semantics: it counts from team repositories rather than member lists, so it includes authors without accounts (surfaced as `authors_without_member` and `created_by_non_members`) and excludes member work in non-team repos. It also documents that opened-time is provider-recorded, that unmatched slugs land in `unmatched_repositories` rather than counting zero, and warns the opened set never reconciles with merged — none of which the annotations convey.

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?

The purpose and the default window are front-loaded, and each paragraph covers a distinct concern (purpose, sibling routing, denominator, merge non-reconciliation). It runs slightly long with some repetition of the repo/author breakdown idea, but no sentence is filler.

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?

For a zero-required-parameter counting tool with an output schema and full annotation coverage, the description supplies everything an agent needs: what is counted, how the denominator is defined, edge-case handling for unmatched repos and non-member authors, and which sibling handles the adjacent question. No meaningful calling decision is left to inference.

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?

Schema coverage is 100%, so the baseline is 3; the description still adds meaning by explaining that the repositories list is the exact denominator and that non-matching slugs are reported instead of silently zeroed, and it notes the human-vs-bot split is always reported regardless of `include_bots`. It does not restate the days/bots defaults, which the schema already covers well.

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?

The first sentence gives a precise verb and resource: "Count pull requests OPENED over a recent window (default 1 day), broken down per repository and per author, with a human-vs-bot/dependabot split." The uppercase OPENED plus the explicit contrast against merges and per-person activity makes it unambiguously distinct from get-merged-pull-requests-tool and get-person-activity-tool.

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?

It states when to use it ("whenever the question is how many pull requests were created, opened or raised — today, this week, on a repo, or across the team"), names a preferred alternative to reject ("Prefer this over a per-person activity breakdown for any total"), and routes the merge case away with "use `get-merged-pull-requests-tool` for merges." Both inclusion and exclusion conditions are explicit.

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