Skip to main content
Glama

get_pull_request

Fetch a single pull request by its number (e.g., #42) and get complete details including branches, mergeable status, merged flag, labels, and milestone.

Instructions

Fetch one pull request by its index — the number shown in the PR URL (e.g. #42), NOT the internal id. Returns the full PR including base/head branches, mergeable status, merged flag, labels, and milestone.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
repoNoRepository name (defaults to GITEA_DEFAULT_REPO)
indexYesPull request number
ownerNoRepository owner (defaults to GITEA_DEFAULT_OWNER)
Behavior3/5

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

No annotations are provided, so the description carries full burden. It states the tool returns the full PR with specific fields, implying a read operation. However, it does not mention permissions, rate limits, or error conditions. For a simple fetch tool, this is adequate but not exhaustive.

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 two sentences, no wasted words. The most critical information (verb, resource, key parameter distinction) appears at the start. Every sentence contributes to understanding the tool's purpose and output.

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 simple fetch tool with no output schema, the description covers the key return fields and parameter usage. Without annotations, it could mention the read-only nature or authentication requirements, but the essential information is present. The tool is fully understandable as documented.

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?

The description adds meaningful context to the `index` parameter by clarifying it is the number shown in the PR URL, not the internal `id`. Input schema coverage is 100%, so the baseline is 3; the description adds value beyond the schema. The `repo` and `owner` parameters are not elaborated, but default behaviors are implied.

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 uses a specific verb ('Fetch') and resource ('one pull request'), clearly identifying the tool's action. It distinguishes the 'index' from the internal 'id', making the purpose unambiguous. The list of returned fields (base/head branches, mergeable status, etc.) further clarifies the scope.

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 description explicitly states when to use the tool: 'Fetch one pull request by its `index`', and clarifies what not to use (internal `id`). It does not explicitly contrast with sibling tools like list_pull_requests, but the context of fetching a single item is clear. A slight improvement would be to mention using list_pull_requests for multiple PRs.

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

Install Server

Other Tools

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/amonstack/gitea_mcp'

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