Skip to main content
Glama

Create PR Summary

create_pr_summary
Read-onlyIdempotent

Generate a structured pull request summary from diff and metadata, including change overview, affected files, test coverage signals, risks, review checklist, and release notes draft.

Instructions

Generate a structured PR summary from the pull request diff and metadata.

The summary includes: change overview, affected files, test coverage signals, risks, review checklist, and release notes draft.

Args:

  • owner, repo: Repository coordinates.

  • pullNumber (number): The PR to summarise.

Returns: Markdown PR summary + structured metadata.

Input Schema

NameRequiredDescriptionDefault
repoNoGitHub repo. Falls back to GITHUB_REPO.
ownerNoGitHub owner. Falls back to GITHUB_OWNER.
pullNumberYesThe pull request number to summarise.

Output Schema

NameRequiredDescriptionDefault
risksYes
titleYes
authorYes
labelsYes
baseRefYes
commitsYes
headRefYes
isDraftYes
docsOnlyYes
evidenceYes
hasTestsYes
pullNumberYes
totalFilesYes
trustBoundaryNo
filesTruncatedYes
totalAdditionsYes
totalDeletionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.11.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed3 schema fields changedv1.9.0
    • addedOutput schema / properties / evidence
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "collectedAt": {
      +      "type": "string"
      +    },
      +    "completeness": {
      +      "enum": [
      +        "complete",
      +        "partial",
      +        "omitted"
      +      ],
      +      "type": "string"
      +    },
      +    "expiresAt": {
      +      "type": "string"
      +    },
      +    "freshness": {
      +      "enum": [
      +        "fresh",
      +        "stale",
      +        "unknown"
      +      ],
      +      "type": "string"
      +    },
      +    "id": {
      +      "type": "string"
      +    },
      +    "kind": {
      +      "type": "string"
      +    },
      +    "limitations": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "provenance": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "appId": {
      +          "exclusiveMinimum": 0,
      +          "maximum": 9007199254740991,
      +          "type": "integer"
      +        },
      +        "policyDigest": {
      +          "type": "string"
      +        },
      +        "provider": {
      +          "type": "string"
      +        },
      +        "ref": {
      +          "type": "string"
      +        },
      +        "sourceContentDigest": {
      +          "pattern": "^[a-f0-9]{64}$",
      +          "type": "string"
      +        },
      +        "subjectSha": {
      +          "type": "string"
      +        },
      +        "toolVersion": {
      +          "type": "string"
      +        },
      +        "url": {
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "reason": {
      +      "type": "string"
      +    },
      +    "recommendedNextActions": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "source": {
      +      "enum": [
      +        "github_api",
      +        "github_check_run",
      +        "repository_file",
      +        "repository_policy",
      +        "caller_assertion",
      +        "system"
      +      ],
      +      "type": "string"
      +    },
      +    "sourceUpdatedAt": {
      +      "type": "string"
      +    },
      +    "state": {
      +      "enum": [
      +        "verified",
      +        "failed",
      +        "pending",
      +        "unverified",
      +        "not_applicable"
      +      ],
      +      "type": "string"
      +    },
      +    "subject": {
      +      "additionalProperties": false,
      +      "properties": {
      +        "number": {
      +          "exclusiveMinimum": 0,
      +          "maximum": 9007199254740991,
      +          "type": "integer"
      +        },
      +        "ref": {
      +          "type": "string"
      +        },
      +        "repo": {
      +          "type": "string"
      +        },
      +        "sha": {
      +          "type": "string"
      +        },
      +        "type": {
      +          "enum": [
      +            "repository",
      +            "pull_request",
      +            "issue",
      +            "release"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "type",
      +        "repo"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "kind",
      +    "subject",
      +    "state",
      +    "freshness",
      +    "completeness",
      +    "source",
      +    "collectedAt",
      +    "provenance",
      +    "reason",
      +    "limitations",
      +    "recommendedNextActions"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / trustBoundary
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "callerAndRepositoryContent": {
      +      "const": "untrusted",
      +      "type": "string"
      +    },
      +    "instructionHandling": {
      +      "const": "never_execute",
      +      "type": "string"
      +    },
      +    "permissionHandling": {
      +      "const": "never_expand",
      +      "type": "string"
      +    },
      +    "secretHandling": {
      +      "const": "never_reveal",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "callerAndRepositoryContent",
      +    "instructionHandling",
      +    "secretHandling",
      +    "permissionHandling"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "pullNumber",
      -  "title",
      -  "author",
      -  "isDraft",
      -  "baseRef",
      -  "headRef",
      -  "commits",
      -  "totalAdditions",
      -  "totalDeletions",
      -  "totalFiles",
      -  "hasTests",
      -  "docsOnly",
      -  "filesTruncated",
      -  "risks",
      -  "labels"
      -]New value: +[
      +  "pullNumber",
      +  "title",
      +  "author",
      +  "isDraft",
      +  "baseRef",
      +  "headRef",
      +  "commits",
      +  "totalAdditions",
      +  "totalDeletions",
      +  "totalFiles",
      +  "hasTests",
      +  "docsOnly",
      +  "filesTruncated",
      +  "risks",
      +  "labels",
      +  "evidence"
      +]
  3. Changed3 schema fields changedv1.8.0
    • addedOutput schema / properties / docsOnly
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / filesTruncated
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "pullNumber",
      -  "title",
      -  "author",
      -  "isDraft",
      -  "baseRef",
      -  "headRef",
      -  "commits",
      -  "totalAdditions",
      -  "totalDeletions",
      -  "totalFiles",
      -  "hasTests",
      -  "risks",
      -  "labels"
      -]New value: +[
      +  "pullNumber",
      +  "title",
      +  "author",
      +  "isDraft",
      +  "baseRef",
      +  "headRef",
      +  "commits",
      +  "totalAdditions",
      +  "totalDeletions",
      +  "totalFiles",
      +  "hasTests",
      +  "docsOnly",
      +  "filesTruncated",
      +  "risks",
      +  "labels"
      +]
  4. First observedv1.5.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=true, so the safety profile is covered. The description adds the output shape (sections and 'Markdown + structured metadata') and confirms it is a generation step with no writes, but says nothing about rate limits, token cost, or diff-size handling.

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 core purpose, then sections, args, and returns in short blocks. The Args block largely duplicates the schema's own descriptions, which is mild redundancy, but nothing is bloated or buried.

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?

For a read-only generation tool with a full output schema and 100% parameter coverage, the definition covers purpose, inputs, and output shape. An agent could invoke it correctly; only sibling routing guidance 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?

Schema description coverage is 100%, including the GITHUB_OWNER/GITHUB_REPO fallback semantics, so the schema carries the load. The description's Args block restates the same three parameters with no added syntax or format detail, matching the baseline 3 for high-coverage schemas.

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?

States a specific verb (Generate) and resource (structured PR summary) and enumerates the summary's contents, so the agent knows exactly what it produces. It does not explicitly distinguish itself from close siblings such as review_pr_against_standard or repo_context, which is the only thing keeping it off a 5.

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?

There is no statement of when to use this tool versus alternatives. The phrase 'from the pull request diff and metadata' implies the input context but never says when a summary is preferable to review_pr_against_standard or repo_context, nor any exclusions or prerequisites.

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