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); }, });

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