Repository navigation
feat: enhance task detail mcp tool - #131
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR enhances the MCP task tooling to return a richer “task detail” view (closer to the web UI), improves comment/activity Markdown formatting (including mention/reference handling), and expands the MCP-side API clients to fetch additional related entities needed for aggregation.
Changes:
- Added comprehensive task detail aggregation for
get_task/get_task_by_number, plus a newformatTaskDetailformatter. - Improved BlockNote ↔ Markdown conversions, including mention/reference conversion when exporting to Markdown.
- Extended the task API client with additional list/fetch methods (subtasks, statuses, types, members) and updated comment inputs to use a unified
contentfield with Markdown → BlockNote conversion.
Reviewed changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| apps/mcp/src/utils/formatters.ts | Adds formatTaskDetail to produce a comprehensive task detail Markdown view (incl. activities, attachments, custom fields). |
| apps/mcp/src/utils/converters.ts | Enhances BlockNote→Markdown export with mention/reference conversion and changes output to raw Markdown. |
| apps/mcp/src/types/index.ts | Renames comment input field from text to content. |
| apps/mcp/src/tools/task-tools.ts | Routes get_task / get_task_by_number through a new aggregation flow using extended/views clients. |
| apps/mcp/src/tools/task-activity-tools.ts | Formats comment activity content as Markdown and updates comment input payload to { content }. |
| apps/mcp/src/api/task-extended-client.ts | Converts Markdown comment content to BlockNote blocks and adds richer list methods for task-related data. |
| apps/mcp/src/api/client.ts | Minor formatting-only changes in task update payload construction. |
| apps/mcp/src/tools/index.ts | Wires extended/views clients into task tooling dispatch. |
| apps/mcp/src/tools/task-type-tools.ts | Formatting-only schema description wrapping. |
| apps/mcp/src/tools/sprint-tools.ts | Formatting-only schema description wrapping. |
| apps/mcp/src/tools/project-tools.ts | Formatting-only schema description wrapping. |
| apps/mcp/src/tools/member-tools.ts | Formatting-only schema description wrapping. |
| apps/mcp/src/tools/document-tools.ts | Formatting-only schema description wrapping. |
| apps/mcp/src/tools/doc-github-tools.ts | Formatting-only schema description wrapping. |
| apps/mcp/src/tools/attachment-tools.ts | Formatting-only import/description wrapping. |
| apps/mcp/src/plugin-loader.ts | Formatting-only change to error string formatting. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Co-authored-by: Copilot Autofix powered by AI <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant improvements to task detail retrieval, formatting, and comment handling in the MCP application. The changes enable comprehensive task detail responses (including all related entities), unify and enhance the formatting of comments and activities (with proper Markdown and mention handling), and add several new API client methods for richer data access. The most important changes are grouped below.
Comprehensive Task Detail Retrieval and Formatting:
getTaskDetailfunction intask-tools.tsthat aggregates all task-related data (statuses, types, sprints, members, subtasks, attachments, activities, custom fields, etc.) and formats it using the newformatTaskDetailutility for detailed, user-facing task descriptions. This is now used by theget_taskandget_task_by_numbertools. [1] [2] [3]get_taskandget_task_by_numbertools to clarify that they now return comprehensive task details, matching the web app's task detail component. [1] [2]API Client and Data Model Enhancements:
PacaAPITaskExtendedClientfor fetching subtasks, task statuses, task types, and project members, enabling richer task detail responses.contentfield. [1] [2] [3]Comment and Activity Formatting Improvements:
task-activity-tools.tsto convert BlockNote blocks to Markdown, including proper mention and reference handling, for more readable and user-friendly output. [1] [2] [3]Mention and Reference Handling:
converters.tsto recursively detect and convert mentions and references (team, task, doc) in BlockNote content to readable Markdown/text, ensuring mentions are represented clearly in formatted outputs.Internal Refactoring and Tool Integration:
handleTaskToolandhandleToolCallfunctions to pass the new extended and views clients, enabling the use of the new data aggregation and formatting features in task tools. [1] [2] [3]formatTaskDetailfunction informatters.tsfor use across the codebase. [1] [2]These changes collectively provide a much richer and more consistent experience when working with tasks, comments, and activities in the MCP app, both for users and for downstream integrations.