Skip to main content
Glama

get_pull_request

Retrieve detailed information about a specific pull request in Backlog projects to review changes, status, and contributors.

Instructions

Returns information about a specific pull request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe numeric ID of the project (e.g., 12345)
projectKeyNoThe key of the project (e.g., 'PROJECT')
repoIdNoRepository ID
repoNameNoRepository name
numberYesPull request number

Implementation Reference

  • The main handler function for the 'get_pull_request' tool. It resolves the project ID or key and repository ID or name using helper functions, then calls the Backlog client's getPullRequest method.
    handler: async ({ projectId, projectKey, repoId, repoName, number }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } const repoRes = resolveIdOrName( 'repository', { id: repoId, name: repoName }, t ); if (!repoRes.ok) { throw repoRes.error; } return backlog.getPullRequest( result.value, String(repoRes.value), number ); },
  • Zod schema definition for the input parameters of the 'get_pull_request' tool, including optional projectId/projectKey, repoId/repoName, and required number.
    const getPullRequestSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_GET_PULL_REQUEST_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_GET_PULL_REQUEST_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), repoId: z .number() .optional() .describe(t('TOOL_GET_PULL_REQUEST_REPO_ID', 'Repository ID')), repoName: z .string() .optional() .describe(t('TOOL_GET_PULL_REQUEST_REPO_NAME', 'Repository name')), number: z .number() .describe(t('TOOL_GET_PULL_REQUEST_NUMBER', 'Pull request number')), }));
  • Registration of the getPullRequestTool within the 'git' toolset group in the allTools function.
    getPullRequestTool(backlog, helper),
  • Output schema reference for the tool response, using PullRequestSchema imported from backlog output definitions.
    outputSchema: PullRequestSchema,
  • Import of the getPullRequestTool function.
    import { getPullRequestTool } from './getPullRequest.js';

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/nulab/backlog-mcp-server'

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