proofhub_create_comment
Post a comment on a ProofHub task by specifying the project, list, task IDs and the comment text.
Instructions
Post a new comment on a ProofHub task.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | ||
| list_id | Yes | ||
| task_id | Yes | ||
| description | Yes | Comment text (plain text or HTML). |
Implementation Reference
- index.js:160-171 (schema)Tool schema definition for proofhub_create_comment, declaring input parameters (project_id, list_id, task_id, description) with all required.
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'], }, - index.js:102-187 (registration)Registration of the tool via the ListToolsRequestSchema handler. The tool is registered alongside other tools 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:294-307 (handler)Handler implementation for proofhub_create_comment. Takes project_id, list_id, task_id, and description from args, then POSTs a new comment to the ProofHub API endpoint and returns the created comment as JSON.
// ── proofhub_create_comment ────────────────────────────────────────── if (name === 'proofhub_create_comment') { const { project_id, list_id, task_id, description } = args; const comment = await apiPost( `/projects/${project_id}/todolists/${list_id}/tasks/${task_id}/comments`, { description } ); return { content: [{ type: 'text', text: JSON.stringify(comment, null, 2), }], }; } - index.js:45-52 (helper)Helper function apiPost used by the handler to make the POST request to the ProofHub API with the comment data.
async function apiPost(url, body) { try { const res = await http.post(url, body); return res.data; } catch (err) { throw new Error(`ProofHub API error ${err.response?.status}: ${JSON.stringify(err.response?.data) || err.message}`); } }