Skip to main content
Glama

Pull request detail

forgejo_get_pull_request
Read-onlyIdempotent

Retrieve a pull request's description, merge state, statistics, and optional unified diff. Use include_diff=false for a light status check or include_diff=true to inspect code changes.

Instructions

Returns a pull request: description, merge state, statistics and, on request, the unified diff.

Parameters: owner, repo, number (required), include_diff (bool, default false), response_format.

Returns: { number, title, state, merged, mergeable, head, base, additions, deletions, changed_files, body, html_url, diff? }

The diff is truncated past the context limit and the cut is explicitly reported in the returned text. Tip: leave include_diff=false for a status check — it saves a lot of context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoRepository name. Defaults to FORGEJO_DEFAULT_REPO.
ownerNoRepository owner (user or organisation). Defaults to FORGEJO_DEFAULT_OWNER.
numberYesPull request number.
include_diffNoAttach the unified diff (large).
response_formatNo'markdown' for a readable rendering, 'json' for the full data.markdown

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the readOnly/idempotent annotations, the description discloses a valuable behavioral detail: the diff is truncated past the context limit and the truncation is explicitly reported. It also warns that include_diff can be large, which helps agents anticipate cost.

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?

The description is compact and front-loaded with the core action, followed by parameter/return summaries and a practical tip. Every sentence contributes information; there is no filler or redundant restatement of the schema.

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?

With no output schema, the description compensates by listing the exact return fields and noting the optional diff plus its truncation behavior. Combined with the fully documented input schema and annotations, an agent has everything needed to call and interpret the tool correctly.

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, but the description adds real semantic value by explaining the include_diff tradeoff and the diff truncation behavior. It contextualizes when to use the boolean parameter without merely repeating the schema.

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 description states a specific verb and resource: 'Returns a pull request' with a detailed field list covering description, merge state, statistics, and optional diff. This clearly distinguishes it from sibling tools like forgejo_list_pull_requests and forgejo_get_issue.

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

Usage Guidelines4/5

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

The tip about leaving include_diff=false for status checks provides concrete context-saving guidance, and the return-field list makes the intended use case clear. It does not explicitly name sibling alternatives or state when not to use it, but the tool's purpose is unambiguous enough.

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

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/Birdiz/forgejo-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server