track
Monitor GitHub pull requests by adding them to your tracking list for daily status checks and automated reports.
Instructions
Start tracking a pull request. Adds the PR to your monitored list so it appears in daily checks and status reports.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prUrl | Yes | Full GitHub PR URL to track (e.g. https://github.com/owner/repo/pull/123) |
Implementation Reference
- The actual implementation of the "track" tool, which validates the provided PR URL and fetches metadata from GitHub.
export async function runTrack(options: { prUrl: string }): Promise<TrackOutput> { validateUrl(options.prUrl); validateGitHubUrl(options.prUrl, PR_URL_PATTERN, 'PR'); const token = requireGitHubToken(); const octokit = getOctokit(token); const parsed = parseGitHubUrl(options.prUrl); if (!parsed || parsed.type !== 'pull') { throw new Error(`Invalid PR URL: ${options.prUrl}`); } const { owner, repo, number } = parsed; const { data: ghPR } = await octokit.pulls.get({ owner, repo, pull_number: number }); return { pr: { repo: `${owner}/${repo}`, number, title: ghPR.title, url: options.prUrl, }, }; } - packages/mcp-server/src/tools.ts:130-142 (registration)Registration of the "track" tool in the MCP server, binding it to the `runTrack` handler.
// 5. track — Track a PR server.registerTool( 'track', { description: 'Start tracking a pull request. Adds the PR to your monitored list so it appears in daily checks and status reports.', inputSchema: { prUrl: z.string().describe('Full GitHub PR URL to track (e.g. https://github.com/owner/repo/pull/123)'), }, annotations: { readOnlyHint: false, destructiveHint: false }, }, wrapTool(runTrack), );