Skip to main content
Glama

update_pull_request

Modify existing pull requests by updating details such as summary, description, assignee, issue linkage, and status. Integrates with Backlog for efficient project management.

Instructions

Updates an existing pull request

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assigneeIdNoUser ID of the assignee
descriptionNoUpdates an existing pull request
issueIdNoIssue ID to link
notifiedUserIdNoUser IDs to notify
numberYesPull request number
projectIdOrKeyYesProject ID or project key
repoIdOrNameYesRepository ID or name
statusIdNoStatus ID
summaryNoSummary of the pull request

Implementation Reference

  • The asynchronous handler function that implements the core logic of the 'update_pull_request' tool by resolving project and repository IDs and invoking backlog.patchPullRequest.
    handler: async ({ projectId, projectKey, repoId, repoName, number, ...params }) => { const result = resolveIdOrKey( 'project', { id: projectId, key: projectKey }, t ); if (!result.ok) { throw result.error; } const resultRepo = resolveIdOrKey( 'repository', { id: repoId, key: repoName }, t ); if (!resultRepo.ok) { throw resultRepo.error; } return backlog.patchPullRequest( result.value, String(resultRepo.value), number, params ); },
  • The Zod schema defining the input parameters for the update_pull_request tool, including project, repo, PR number, and update fields.
    const updatePullRequestSchema = buildToolSchema((t) => ({ projectId: z .number() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_PROJECT_ID', 'The numeric ID of the project (e.g., 12345)' ) ), projectKey: z .string() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_PROJECT_KEY', "The key of the project (e.g., 'PROJECT')" ) ), repoId: z .number() .optional() .describe(t('TOOL_UPDATE_PULL_REQUEST_REPO_ID', 'Repository ID')), repoName: z .string() .optional() .describe(t('TOOL_UPDATE_PULL_REQUEST_REPO_NAME', 'Repository name')), number: z .number() .describe(t('TOOL_UPDATE_PULL_REQUEST_NUMBER', 'Pull request number')), summary: z .string() .optional() .describe( t('TOOL_UPDATE_PULL_REQUEST_SUMMARY', 'Summary of the pull request') ), description: z .string() .optional() .describe( t( 'TOOL_UPDATE_PULL_REQUEST_DESCRIPTION', 'Description of the pull request' ) ), issueId: z .number() .optional() .describe(t('TOOL_UPDATE_PULL_REQUEST_ISSUE_ID', 'Issue ID to link')), assigneeId: z .number() .optional() .describe( t('TOOL_UPDATE_PULL_REQUEST_ASSIGNEE_ID', 'User ID of the assignee') ), notifiedUserId: z .array(z.number()) .optional() .describe( t('TOOL_UPDATE_PULL_REQUEST_NOTIFIED_USER_ID', 'User IDs to notify') ), statusId: z .number() .optional() .describe(t('TOOL_UPDATE_PULL_REQUEST_STATUS_ID', 'Status ID')), }));
  • Registration of the updatePullRequestTool in the 'git' toolset group within allTools function.
    updatePullRequestTool(backlog, helper),
  • Import of the updatePullRequestTool for registration.
    import { updatePullRequestTool } from './updatePullRequest.js';
  • Reference to the output schema (PullRequestSchema) for the tool response validation.
    outputSchema: PullRequestSchema,

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