Skip to content

feat: enhance task detail mcp tool - #131

Merged
pikann merged 6 commits into
masterfrom
feature/enhance-task-detail-mcp-tool
May 21, 2026
Merged

pikann merged 6 commits into
masterfrom
feature/enhance-task-detail-mcp-tool

Conversation

@pikann

@pikann pikann commented May 21, 2026

Copy link
Copy Markdown
Contributor

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:

  • Added a new getTaskDetail function in task-tools.ts that aggregates all task-related data (statuses, types, sprints, members, subtasks, attachments, activities, custom fields, etc.) and formats it using the new formatTaskDetail utility for detailed, user-facing task descriptions. This is now used by the get_task and get_task_by_number tools. [1] [2] [3]
  • Expanded the descriptions for the get_task and get_task_by_number tools 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:

  • Added several new methods to PacaAPITaskExtendedClient for fetching subtasks, task statuses, task types, and project members, enabling richer task detail responses.
  • Updated comment creation and update methods to convert Markdown to BlockNote blocks before sending to the API, and refactored the input types for comments to use a unified content field. [1] [2] [3]

Comment and Activity Formatting Improvements:

  • Updated comment and activity formatting in task-activity-tools.ts to 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:

  • Introduced new utility functions in converters.ts to 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:

  • Updated the handleTaskTool and handleToolCall functions 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]
  • Added and exported the new formatTaskDetail function in formatters.ts for 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 new formatTaskDetail formatter.
  • 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 content field 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.

Comment thread apps/mcp/src/tools/task-tools.ts Resolved
Comment thread apps/mcp/src/utils/converters.ts Resolved
Comment thread apps/mcp/src/utils/converters.ts Resolved
Comment thread apps/mcp/src/utils/formatters.ts Resolved
pikann and others added 3 commits May 22, 2026 00:40
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]>
Copilot finished work on behalf of pikann May 21, 2026 17:48
@pikann
pikann merged commit f6eb4eb into master May 21, 2026
1 check passed
@pikann
pikann deleted the feature/enhance-task-detail-mcp-tool branch May 21, 2026 17:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants