linear-toon-mcp 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/linear_toon_mcp/tools/delete_project_milestone.rb +37 -0
- data/lib/linear_toon_mcp/tools/save_project_milestone.rb +97 -0
- data/lib/linear_toon_mcp/tools.rb +2 -0
- data/lib/linear_toon_mcp/version.rb +1 -1
- data/lib/linear_toon_mcp.rb +1 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f153b22caa9c1df3508d6ee6e5e515c9233a45bb46e85cfe23dc4293f552eca1
|
|
4
|
+
data.tar.gz: 1b28577e054f4aa6759b1cd1a78f6ae189d78c94ec3f39b65abaaf28a4362128
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9edb2ad3b2bdec827ccd31c4bd18466e8d5c2e3ece9b6568d62ef21faa2262ffc7c3f4fdc98053993845485412f0ac2ed59ffb40db7478ff27668513dc716b6c
|
|
7
|
+
data.tar.gz: d765472c7885e39684d40ed9543fc73b30e8475c7e62af7cf6818d9bf61acf0fe6d135df2c500f71b54d7456d00e8c6ffac09f1f9dd0a92e5a3993b5e2adb4ec
|
data/README.md
CHANGED
|
@@ -68,6 +68,8 @@ Most parameters accept either a UUID or a human identifier (issue identifier lik
|
|
|
68
68
|
| `get_project` | Retrieve a project by name, ID, or slug. Optional includes for members, milestones, and resources. |
|
|
69
69
|
| `save_project` | Create or update a project. On create, `name` and `teams` (one or more) are required. Resolves names to IDs for teams, lead, members, labels, status, and initiative (initiative links on creation only — use `add_project_to_initiative` afterwards). |
|
|
70
70
|
| `archive_project` | Archive a project (recoverable soft delete). Linear has no hard-delete for projects. |
|
|
71
|
+
| `save_project_milestone` | Create or update a project milestone. On create, `name` and `project` are required. `sortOrder` positions the milestone among its siblings. `project` is create-only — this tool does not move milestones between projects, so it is rejected on update. |
|
|
72
|
+
| `delete_project_milestone` | Delete a project milestone by ID. Issues assigned to it are detached, not deleted. |
|
|
71
73
|
|
|
72
74
|
### Initiatives
|
|
73
75
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module LinearToonMcp
|
|
4
|
+
module Tools
|
|
5
|
+
# Delete a project milestone by id. Issues assigned to the milestone
|
|
6
|
+
# are detached, not deleted.
|
|
7
|
+
class DeleteProjectMilestone < Delete
|
|
8
|
+
description "Delete a project milestone (issues are detached, not deleted)"
|
|
9
|
+
|
|
10
|
+
label "Milestone"
|
|
11
|
+
|
|
12
|
+
annotations(
|
|
13
|
+
read_only_hint: false,
|
|
14
|
+
destructive_hint: true,
|
|
15
|
+
idempotent_hint: false
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
input_schema(
|
|
19
|
+
properties: {
|
|
20
|
+
id: {type: "string", description: "Milestone ID"}
|
|
21
|
+
},
|
|
22
|
+
required: ["id"],
|
|
23
|
+
additionalProperties: false
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
MUTATION = <<~GRAPHQL
|
|
27
|
+
mutation($id: String!) {
|
|
28
|
+
projectMilestoneDelete(id: $id) { success entityId }
|
|
29
|
+
}
|
|
30
|
+
GRAPHQL
|
|
31
|
+
|
|
32
|
+
def variables(id:)
|
|
33
|
+
{id: id}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module LinearToonMcp
|
|
4
|
+
module Tools
|
|
5
|
+
# Create or update a project milestone. +id+ presence determines
|
|
6
|
+
# create vs update. On create, +name+ and +project+ are required;
|
|
7
|
+
# +project+ is resolved via {Resolvers::Project}. +project+ is
|
|
8
|
+
# create-only — this tool does not move milestones between projects.
|
|
9
|
+
class SaveProjectMilestone < Base
|
|
10
|
+
description "Create or update a project milestone (id presence determines)"
|
|
11
|
+
|
|
12
|
+
annotations(
|
|
13
|
+
read_only_hint: false,
|
|
14
|
+
destructive_hint: false,
|
|
15
|
+
idempotent_hint: false
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
# standard:disable Layout/LineLength
|
|
19
|
+
input_schema(
|
|
20
|
+
properties: {
|
|
21
|
+
id: {type: "string", description: "Milestone ID. If provided, updates the existing milestone; otherwise creates"},
|
|
22
|
+
project: {type: "string", description: "Project name, ID, or slug (required when creating — rejected on update)"},
|
|
23
|
+
name: {type: "string", description: "Milestone name (required when creating)"},
|
|
24
|
+
description: {type: "string", description: "Description as Markdown"},
|
|
25
|
+
targetDate: {type: "string", description: "Target date (ISO format, YYYY-MM-DD)"},
|
|
26
|
+
sortOrder: {type: "number", description: "Position among the project's milestones — lower sorts first"}
|
|
27
|
+
},
|
|
28
|
+
additionalProperties: false
|
|
29
|
+
)
|
|
30
|
+
# standard:enable Layout/LineLength
|
|
31
|
+
|
|
32
|
+
RETURN_FIELDS = <<~GRAPHQL
|
|
33
|
+
id
|
|
34
|
+
name
|
|
35
|
+
description
|
|
36
|
+
targetDate
|
|
37
|
+
sortOrder
|
|
38
|
+
status
|
|
39
|
+
project { id name }
|
|
40
|
+
GRAPHQL
|
|
41
|
+
|
|
42
|
+
CREATE_MUTATION = <<~GRAPHQL
|
|
43
|
+
mutation($input: ProjectMilestoneCreateInput!) {
|
|
44
|
+
projectMilestoneCreate(input: $input) {
|
|
45
|
+
success
|
|
46
|
+
projectMilestone { #{RETURN_FIELDS.strip} }
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
GRAPHQL
|
|
50
|
+
|
|
51
|
+
UPDATE_MUTATION = <<~GRAPHQL
|
|
52
|
+
mutation($id: String!, $input: ProjectMilestoneUpdateInput!) {
|
|
53
|
+
projectMilestoneUpdate(id: $id, input: $input) {
|
|
54
|
+
success
|
|
55
|
+
projectMilestone { #{RETURN_FIELDS.strip} }
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
GRAPHQL
|
|
59
|
+
|
|
60
|
+
def perform(id: nil, **kwargs)
|
|
61
|
+
id ? update(id, kwargs) : create(kwargs)
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
private
|
|
65
|
+
|
|
66
|
+
def create(kwargs)
|
|
67
|
+
raise Error, "name is required when creating a milestone" unless kwargs[:name]
|
|
68
|
+
project = kwargs[:project] or raise Error, "project is required when creating a milestone"
|
|
69
|
+
|
|
70
|
+
input = build_input(kwargs).merge(projectId: Resolvers::Project.call(value: project))
|
|
71
|
+
submit(CREATE_MUTATION, "projectMilestoneCreate", input:)
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def update(id, kwargs)
|
|
75
|
+
if kwargs.key?(:project)
|
|
76
|
+
raise Error, "Cannot pass `project` on update — this tool does not move milestones between projects"
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
submit(UPDATE_MUTATION, "projectMilestoneUpdate", id:, input: build_input(kwargs))
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def submit(mutation, mutation_key, **variables)
|
|
83
|
+
data = client.query(mutation, variables:)
|
|
84
|
+
result = data[mutation_key] or raise Error, "Milestone save failed: no result returned"
|
|
85
|
+
raise Error, "Milestone save failed" unless result["success"]
|
|
86
|
+
result["projectMilestone"]
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def build_input(kwargs)
|
|
90
|
+
{name: :name, description: :description, targetDate: :targetDate,
|
|
91
|
+
sortOrder: :sortOrder}.each_with_object({}) do |(key, field), input|
|
|
92
|
+
input[field] = kwargs[key] if kwargs.key?(key)
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
@@ -39,6 +39,8 @@ require_relative "tools/save_status_update"
|
|
|
39
39
|
require_relative "tools/delete_status_update"
|
|
40
40
|
require_relative "tools/save_project"
|
|
41
41
|
require_relative "tools/archive_project"
|
|
42
|
+
require_relative "tools/save_project_milestone"
|
|
43
|
+
require_relative "tools/delete_project_milestone"
|
|
42
44
|
require_relative "tools/get_team"
|
|
43
45
|
require_relative "tools/get_user"
|
|
44
46
|
require_relative "tools/get_issue_status"
|
data/lib/linear_toon_mcp.rb
CHANGED
|
@@ -42,6 +42,7 @@ module LinearToonMcp
|
|
|
42
42
|
Tools::ListStatusUpdates, Tools::GetStatusUpdate,
|
|
43
43
|
Tools::SaveStatusUpdate, Tools::DeleteStatusUpdate,
|
|
44
44
|
Tools::SaveProject, Tools::ArchiveProject,
|
|
45
|
+
Tools::SaveProjectMilestone, Tools::DeleteProjectMilestone,
|
|
45
46
|
Tools::GetTeam, Tools::GetUser, Tools::GetIssueStatus,
|
|
46
47
|
Tools::CreateIssueLabel
|
|
47
48
|
]
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: linear-toon-mcp
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yevhenii Hurin
|
|
@@ -85,6 +85,7 @@ files:
|
|
|
85
85
|
- lib/linear_toon_mcp/tools/delete.rb
|
|
86
86
|
- lib/linear_toon_mcp/tools/delete_comment.rb
|
|
87
87
|
- lib/linear_toon_mcp/tools/delete_initiative.rb
|
|
88
|
+
- lib/linear_toon_mcp/tools/delete_project_milestone.rb
|
|
88
89
|
- lib/linear_toon_mcp/tools/delete_status_update.rb
|
|
89
90
|
- lib/linear_toon_mcp/tools/get.rb
|
|
90
91
|
- lib/linear_toon_mcp/tools/get_initiative.rb
|
|
@@ -110,6 +111,7 @@ files:
|
|
|
110
111
|
- lib/linear_toon_mcp/tools/save_initiative.rb
|
|
111
112
|
- lib/linear_toon_mcp/tools/save_issue.rb
|
|
112
113
|
- lib/linear_toon_mcp/tools/save_project.rb
|
|
114
|
+
- lib/linear_toon_mcp/tools/save_project_milestone.rb
|
|
113
115
|
- lib/linear_toon_mcp/tools/save_status_update.rb
|
|
114
116
|
- lib/linear_toon_mcp/version.rb
|
|
115
117
|
homepage: https://github.com/hoblin/linear-toon-mcp
|