Skip to main content
Glama

get_pull_request

Retrieve specific Pull Request details from Gitee repositories by providing the owner, repository path, and PR number to manage and review code changes efficiently.

Instructions

获取 Gitee 仓库中的特定 Pull Request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYesRepository owner path (enterprise, organization, or personal path)
pull_numberYesPull Request number
repoYesRepository path

Implementation Reference

  • The core handler function that validates inputs, constructs the Gitee API URL for fetching a specific pull request, makes the GET request, and parses the response using GiteePullRequestSchema.
    export async function getPullRequest(
      owner: string,
      repo: string,
      pullNumber: number
    ) {
      owner = validateOwnerName(owner);
      repo = validateRepositoryName(repo);
    
      const url = `/repos/${owner}/${repo}/pulls/${pullNumber}`;
      const response = await giteeRequest(url, "GET");
    
      return GiteePullRequestSchema.parse(response);
    }
  • Zod schema defining the input parameters for the get_pull_request tool: owner, repo, and pull_number.
    export const GetPullRequestSchema = z.object({
      // 仓库所属空间地址 (企业、组织或个人的地址 path)
      owner: z.string().describe("Repository owner path (enterprise, organization, or personal path)"),
      // 仓库路径 (path)
      repo: z.string().describe("Repository path"),
      // Pull Request 编号
      pull_number: z.number().describe("Pull Request number"),
    });
  • index.ts:214-222 (registration)
    Registers the 'get_pull_request' tool on the MCP server, providing the name, description, schema from pullOperations, and a handler that extracts parameters and delegates to the pullOperations.getPullRequest function.
    server.registerTool({
      name: "get_pull_request",
      description: "获取 Gitee 仓库中的特定 Pull Request",
      schema: pullOperations.GetPullRequestSchema,
      handler: async (params: any) => {
        const { owner, repo, pull_number } = params;
        return await pullOperations.getPullRequest(owner, repo, pull_number);
      },
    });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the retrieval action without mentioning whether it's read-only, requires authentication, has rate limits, or what the return format includes. This is inadequate for a tool with no annotation coverage.

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 a single, efficient sentence in Chinese that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, with zero wasted text.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't address behavioral aspects like authentication needs, error handling, or return structure, which are critical for a retrieval tool in a version control context with sibling tools.

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?

The schema description coverage is 100%, with all three parameters clearly documented in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as format examples or constraints, meeting the baseline for high schema coverage.

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?

The description clearly states the action ('获取' meaning 'get') and resource ('特定 Pull Request' meaning 'specific Pull Request'), specifying it retrieves a particular PR from a Gitee repository. However, it doesn't distinguish this tool from its sibling 'list_pull_requests' which likely lists multiple PRs, missing explicit differentiation.

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?

No guidance is provided on when to use this tool versus alternatives. The description doesn't mention prerequisites like authentication, nor does it contrast with 'list_pull_requests' for bulk retrieval or 'update_pull_request' for modifications, leaving usage context implied.

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

Related 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/normal-coder/gitee-mcp-server'

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