Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 216 additions & 42 deletions services/src/main/java/io/meeds/task/mcp/TaskMcpTool.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,12 @@ public class ProjectActivityModel {
@JsonProperty("other_uncompleted_tasks")
private List<TaskWithChangeLogModel> otherUncompletedTasks;

/** Whether the project has more such tasks than the answer holds. */
@JsonProperty("has_more")
private boolean hasMore;

/** The project's uncompleted tasks, whatever their last activity. */
@JsonProperty("uncompleted_count")
private long uncompletedCount;

}
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,37 @@ public class TaskCollectionModel {
@JsonInclude(Include.NON_NULL)
private Long coworkerCount;

/**
* With {@code group_by_project}, the number of boards the user can access
* that hold at least one open task (EXO-94360).
*/
@JsonProperty("open_project_count")
@JsonInclude(Include.NON_NULL)
private Integer openProjectCount;

/**
* With {@code group_by_project}, the boards holding selected tasks that
* {@code projects} leaves out, past its cap (EXO-94360).
*/
@JsonProperty("projects_not_listed")
@JsonInclude(Include.NON_NULL)
private Integer projectsNotListed;

/**
* With {@code group_by_project}, how many of the tasks counted by
* {@code count} are personal tasks, on no board (EXO-94360).
*/
@JsonProperty("personal_count")
@JsonInclude(Include.NON_NULL)
private Long personalCount;

/**
* With {@code group_by_project}, one sentence stating the count, the
* filters applied and the boards, built from the fields above (EXO-94360).
*/
@JsonInclude(Include.NON_NULL)
private String summary;

/**
* A page of tasks, with no count per board.
*
Expand All @@ -101,7 +132,7 @@ public class TaskCollectionModel {
* @param nextOffset the offset of the next page, null when none remains
*/
public TaskCollectionModel(List<?> tasks, int usedOffset, int usedLimit, long count, boolean hasMore, Integer nextOffset) {
this(tasks, usedOffset, usedLimit, count, hasMore, nextOffset, null, null, null, null);
this(tasks, usedOffset, usedLimit, count, hasMore, nextOffset, null, null, null, null, null, null, null, null);
}

}
7 changes: 7 additions & 0 deletions services/src/main/resources/ai-tool-definition-upgrades.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"tools": [
{
"name": "list_project_activity_since",
"replaced_definitions": [
"0648b6b3cc88c4567304a1730b8a9ac39b7f69a62acddd8c2aa2235831c15b04"
]
},
{
"name": "list_assigned_tasks",
"replaced_definitions": [
Expand Down Expand Up @@ -28,6 +34,7 @@
"10abeb66b8198e0d58c2a6912dd9fa52206b6c2f7fe52580ad35ef6164748fd5",
"145e138e197cb987638d1861ae78e2afb5657e21544a30f0a20080bf338b7988",
"252681e7e18cb7d368b2b2057465564e5c407751768dccb753233f86b31214f4",
"2b53f023e39465e999c43f9d33f7ae28dc3e78340a9e53d79f9c5f8eee831642",
"3762d94cb1d5a4d859a6160b4851d45b04f5167424a9c918b2ef07d93b0a78fb",
"391321c06ae52b6c4f483cd44d91168bcb31ede13535969a64069eb2d7b631a8",
"444ebb6dcec142ec858fdbd0328f7074d8cbeffb93ac7ea6004a3a2646097159",
Expand Down
6 changes: 3 additions & 3 deletions services/src/main/resources/ai-tool-definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@
{
"name": "list_tasks",
"title": "List Tasks",
"description": "List tasks, optionally filtered by project; without project_id, every task the user can access, personal tasks included. With overdue_only, only the open tasks past their due date, the most overdue first; an overdue task carries days_overdue. With title, only the tasks whose title contains it, ignoring case. With changed_since, only the tasks whose status, project, due date, assignee or completion changed since that date, completed tasks included unless hide_completed_tasks; an assignee change of a task created since that date is not counted. With completed_since, only the tasks completed since that date. A task listed with either carries changes: each change since that date, oldest first, with its field (status, project, due_date, assignee or completed), its old_value and new_value when the change log records them, its date and its author; to tell what moved, use them instead of comparing dates. With assignee, only the tasks assigned to that user; with status_id, only the tasks in that status. With without_due_date, only the tasks with no due date; with due_from and due_to, only those due in that range. With priority, only the tasks of that priority: for a question on priority, filter with it and answer from count and the items, never by reading pages for it. With group_by_project, projects counts board by board the tasks selected (count) beside the board's open tasks the user can access (open_count), the most first: to tell which boards have tasks with no due date, or due in a range, call it once without project_id, never once per project; in a run limited to a space, once per project of that space. Compact items (status is the board column); get_task_by_id for details. A commented task carries last_comment_date and last_comment_author, its latest comment or reply; comments_count counts the replies. count is the total. While has_more, call again with offset=next_offset. In a run limited to a space, project_id is required and must be a project of that space, as list_projects returns them; to find a task by its title, list the tasks of each of those projects with title. Elsewhere, to find a task by words of its title or description, call search_tasks instead of listing a whole project.",
"description": "List tasks, optionally filtered by project; without project_id, every task the user can access, personal tasks included. With overdue_only, only the open tasks past their due date, the most overdue first; an overdue task carries days_overdue. With title, only the tasks whose title contains it, ignoring case. With changed_since, only the tasks whose status, project, due date, assignee or completion changed since that date, completed tasks included unless hide_completed_tasks; an assignee change of a task created since that date is not counted. With completed_since, only the tasks completed since that date. A task listed with either carries changes: each change since that date, oldest first, with its field (status, project, due_date, assignee or completed), its old_value and new_value when the change log records them, its date and its author; to tell what moved, use them instead of comparing dates. With assignee, only the tasks assigned to that user; with status_id, only the tasks in that status. With without_due_date, only the tasks with no due date; with due_from and due_to, only those due in that range. With priority, only the tasks of that priority: for a question on priority, filter with it and answer from count and the items, never by reading pages for it. With group_by_project, projects counts board by board the tasks selected (count) beside the board's open tasks the user can access (open_count), the most first: to tell which boards have tasks with no due date, or due in a range, call it once without project_id, never once per project; in a run limited to a space, once per project of that space. The grouped answer also gives project_count, the boards holding the tasks selected; open_project_count, the boards holding open tasks the user can access; projects_not_listed, the boards left out of projects; personal_count, the personal tasks, on no board, among count; and summary, one sentence stating them with the filters of this call: answer from these fields about this call's filters, never reuse a summary for another question. A grouped call with limit 1 returns at most one task beside the counts, and has_more false; a grouped call with a larger limit pages as usual. Compact items (status is the board column); get_task_by_id for details. A commented task carries last_comment_date and last_comment_author, its latest comment or reply; comments_count counts the replies. count is the total. While has_more, call again with offset=next_offset. In a run limited to a space, project_id is required and must be a project of that space, as list_projects returns them; to find a task by its title, list the tasks of each of those projects with title. Elsewhere, to find a task by words of its title or description, call search_tasks instead of listing a whole project.",
"input_schema": {
"type": "object",
"properties": {
Expand All @@ -163,7 +163,7 @@
"without_due_date": { "type": "boolean", "description": "Only the tasks with no due date; not together with overdue_only, due_from or due_to." },
"due_from": { "type": "string", "description": "Only the tasks due at or after this date: a date such as 2026-11-09, from the start of that day in the user's time zone, or a date and time with its offset." },
"due_to": { "type": "string", "description": "Only the tasks due at or before this date: a date such as 2026-11-15, to the end of that day in the user's time zone, or a date and time with its offset." },
"group_by_project": { "type": "boolean", "description": "true: also projects, the count of the tasks the filters select on each board (hide_completed_tasks included) and its open_count, the board's open tasks the user can access, and project_count." },
"group_by_project": { "type": "boolean", "description": "true: also projects, the count of the tasks the filters select on each board (hide_completed_tasks included) and its open_count, the board's open tasks the user can access, project_count, open_project_count, projects_not_listed, personal_count and summary." },
"priority": { "type": "string", "enum": ["HIGH", "NORMAL", "LOW", "NONE"], "description": "Only the tasks of this priority; NONE also selects the tasks with no priority. count then counts those tasks, and with group_by_project so does each board's count." }
}
},
Expand All @@ -178,7 +178,7 @@
{
"name": "list_project_activity_since",
"title": "Get Project Activity since last days",
"description": "Retrieve a project activity since a designated date and list all other uncompleted tasks.",
"description": "Lists a project's tasks updated in the last days, the most recently active first, each with its changes and comments of the period, then its other uncompleted tasks: at most 20 tasks in all. The period starts at midnight of the user's day, that number of days ago. has_more is true when the project has more such tasks than shown: to list every uncompleted task of the project, page list_tasks with project_id and hide_completed_tasks true. uncompleted_count is the count of the project's uncompleted tasks.",
"input_schema": {
"type": "object",
"properties": {
Expand Down
Loading
Loading