proofhub_get_task_with_bug_links
Retrieves a ProofHub task's description and comments, then extracts and returns linked bug tracker issues from platforms like Jira, GitHub, or Linear.
Instructions
One-shot tool: given a ProofHub task URL (or IDs), fetches the task description AND all comments, then extracts any bug-tracker links (Jira, Linear, GitHub Issues, GitLab, YouTrack, ClickUp, Asana, etc.) found in any of those texts. Returns the task data plus a deduplicated list of bug links.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Full ProofHub task URL (preferred). If supplied, project_id/list_id/task_id are ignored. | |
| project_id | No | ||
| list_id | No | ||
| task_id | No |
Implementation Reference
- index.js:231-292 (handler)Handler that fetches a ProofHub task and its comments in parallel, extracts bug-tracker links (Jira, Linear, GitHub Issues, GitLab, YouTrack, Bugzilla, ClickUp, Asana) from all text, and returns a structured result with task details, comments, and deduplicated bug links.
if (name === 'proofhub_get_task_with_bug_links') { let { url, project_id, list_id, task_id } = args; // Resolve IDs from URL if provided if (url) { const ids = parseProofHubUrl(url); project_id = ids.projectId; list_id = ids.listId; task_id = ids.taskId; } if (!project_id || !list_id || !task_id) { throw new Error('Could not determine project_id, list_id, or task_id. Provide a full ProofHub URL or all three IDs.'); } // Parallel fetch task + comments const [task, comments] = await Promise.all([ apiGet(`/projects/${project_id}/todolists/${list_id}/tasks/${task_id}`), apiGet(`/projects/${project_id}/todolists/${list_id}/tasks/${task_id}/comments`), ]); // Collect all text blobs to search for bug links const allText = [ task.description || '', ...(Array.isArray(comments) ? comments.map(c => c.description || '') : []), ].join('\n'); const bugLinks = extractBugLinks(allText); // Build clean summary const result = { task: { id: task.id, title: task.title, description: stripHtml(task.description), stage: task.stage?.name, list: task.list?.name, project: task.project?.name, updated_at: task.updated_at, custom_fields: task.custom_fields, }, comments: Array.isArray(comments) ? comments.map(c => ({ id: c.id, description: stripHtml(c.description), created_at: c.created_at, })) : [], bug_links_found: bugLinks, bug_links_count: bugLinks.length, note: bugLinks.length > 0 ? `Found ${bugLinks.length} bug-tracker link(s). You can use your bug-tracker MCP tools with these URLs.` : 'No bug-tracker links detected in task description or comments.', }; return { content: [{ type: 'text', text: JSON.stringify(result, null, 2), }], }; } - index.js:143-158 (schema)Schema definition for the proofhub_get_task_with_bug_links tool, accepts optional URL or individual project_id/list_id/task_id fields.
{ name: 'proofhub_get_task_with_bug_links', description: 'One-shot tool: given a ProofHub task URL (or IDs), fetches the task description AND all comments, ' + 'then extracts any bug-tracker links (Jira, Linear, GitHub Issues, GitLab, YouTrack, ClickUp, Asana, etc.) ' + 'found in any of those texts. Returns the task data plus a deduplicated list of bug links.', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Full ProofHub task URL (preferred). If supplied, project_id/list_id/task_id are ignored.' }, project_id: { type: 'string' }, list_id: { type: 'string' }, task_id: { type: 'string' }, }, }, }, - index.js:102-187 (registration)Registration of the tool via ListToolsRequestSchema handler. The tool is listed in the tools array.
server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ { name: 'proofhub_parse_url', description: 'Parse a ProofHub task URL and return the project ID, list ID, and task ID embedded in it. ' + 'Use this as the first step before calling other ProofHub tools.', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Full ProofHub task URL, e.g. https://kpi.proofhub.com/bappswift/#app/todos/project-7189443252/list-270280503800/task-514774338823' }, }, required: ['url'], }, }, { name: 'proofhub_get_task', description: 'Fetch full task details (title, description, stage, custom fields, assignees) from ProofHub.', inputSchema: { type: 'object', properties: { project_id: { type: 'string' }, list_id: { type: 'string' }, task_id: { type: 'string' }, }, required: ['project_id', 'list_id', 'task_id'], }, }, { name: 'proofhub_get_comments', description: 'Fetch all comments on a ProofHub task, including their full text.', inputSchema: { type: 'object', properties: { project_id: { type: 'string' }, list_id: { type: 'string' }, task_id: { type: 'string' }, }, required: ['project_id', 'list_id', 'task_id'], }, }, { name: 'proofhub_get_task_with_bug_links', description: 'One-shot tool: given a ProofHub task URL (or IDs), fetches the task description AND all comments, ' + 'then extracts any bug-tracker links (Jira, Linear, GitHub Issues, GitLab, YouTrack, ClickUp, Asana, etc.) ' + 'found in any of those texts. Returns the task data plus a deduplicated list of bug links.', inputSchema: { type: 'object', properties: { url: { type: 'string', description: 'Full ProofHub task URL (preferred). If supplied, project_id/list_id/task_id are ignored.' }, project_id: { type: 'string' }, list_id: { type: 'string' }, task_id: { type: 'string' }, }, }, }, { name: 'proofhub_create_comment', description: 'Post a new comment on a ProofHub task.', inputSchema: { type: 'object', properties: { project_id: { type: 'string' }, list_id: { type: 'string' }, task_id: { type: 'string' }, description: { type: 'string', description: 'Comment text (plain text or HTML).' }, }, required: ['project_id', 'list_id', 'task_id', 'description'], }, }, { name: 'proofhub_get_task_history', description: 'Fetch the activity history of a ProofHub task (stage changes, edits, etc.).', inputSchema: { type: 'object', properties: { project_id: { type: 'string' }, list_id: { type: 'string' }, task_id: { type: 'string' }, }, required: ['project_id', 'list_id', 'task_id'], }, }, ], })); - index.js:56-65 (helper)Helper to parse ProofHub task IDs from a URL path containing project-/list-/task- prefixed numeric IDs.
function parseProofHubUrl(url) { const projectMatch = url.match(/project-(\d+)/); const listMatch = url.match(/list-(\d+)/); const taskMatch = url.match(/task-(\d+)/); return { projectId: projectMatch?.[1] || null, listId: listMatch?.[1] || null, taskId: taskMatch?.[1] || null, }; } - index.js:81-89 (helper)Helper to extract bug-tracker URLs from text using regex patterns for Jira, Linear, GitHub Issues, GitLab, YouTrack, Bugzilla, ClickUp, and Asana.
function extractBugLinks(text) { if (!text) return []; const links = new Set(); for (const pattern of BUG_TRACKER_PATTERNS) { const matches = text.matchAll(pattern); for (const m of matches) links.add(m[0]); } return [...links]; }