linear-toon-mcp 1.1.0 → 1.1.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2c8f7853b331d24b32b67d2f6f5db8fae9c4833a25470011019463c69c621fac
|
|
4
|
+
data.tar.gz: '058de398a53a8109347de0ac55f75d6407a2a65e07cbdd10cd8a65754ae99009'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bd93c8d45aa51d44ae10b3e83adebc94db4f09588c73483797163b7ea8ee9ee8b7659383b450beab5759449e99c2788899c97430acd466dc16f5ee25adfbd129
|
|
7
|
+
data.tar.gz: 417404d0048ec42ae75cd1d11f445d283ac3bc72f2bfa265f8825e47e7d1da0746ff579236755285efbaf0ea1288340c390d9e6f41df31834059e6522c222464
|
data/README.md
CHANGED
|
@@ -42,7 +42,7 @@ claude mcp add linear-toon -e LINEAR_API_KEY=lin_api_xxxxx -- linear-toon-mcp
|
|
|
42
42
|
|
|
43
43
|
## Tools
|
|
44
44
|
|
|
45
|
-
Most parameters accept either a UUID or a human identifier (issue identifier like `LIN-123`, team key like `VIB`, project/initiative/label name, user email or `"me"`); the server resolves it. `save_*` tools dispatch by `id` presence — provide an `id` to update, omit it to create. All responses are TOON-encoded.
|
|
45
|
+
Most parameters accept either a UUID or a human identifier (issue identifier like `LIN-123`, team key like `VIB`, project/initiative/label name, user email or `"me"`); the server resolves it, and rejects blank values. `save_*` tools dispatch by `id` presence — provide an `id` to update, omit it to create. All responses are TOON-encoded.
|
|
46
46
|
|
|
47
47
|
### Issues
|
|
48
48
|
|
|
@@ -140,8 +140,9 @@ module LinearToonMcp
|
|
|
140
140
|
# @param value [String]
|
|
141
141
|
# @param scope [Hash] parent-scope kwargs (e.g. +team_id:+)
|
|
142
142
|
# @return [String] resolved UUID
|
|
143
|
-
# @raise [Error] when no attribute resolves
|
|
143
|
+
# @raise [Error] when +value+ is blank or no attribute resolves it
|
|
144
144
|
def call(value:, **scope)
|
|
145
|
+
raise Error, "#{entity_label} must not be blank" if value.strip.empty?
|
|
145
146
|
new(**scope).resolve(value)
|
|
146
147
|
end
|
|
147
148
|
|
|
@@ -5,8 +5,30 @@ module LinearToonMcp
|
|
|
5
5
|
# Resolves a Linear project status by name (workspace-scoped).
|
|
6
6
|
class ProjectStatus < Base
|
|
7
7
|
connection :projectStatuses
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
|
|
9
|
+
class << self
|
|
10
|
+
# Linear's projectStatuses field accepts no filter argument.
|
|
11
|
+
def query
|
|
12
|
+
@query ||= "query { #{connection_name} { nodes { id name } } }"
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Resolves +value+ to a UUID. UUIDs pass through unchanged; otherwise the
|
|
17
|
+
# workspace status list is matched by name, ignoring case.
|
|
18
|
+
#
|
|
19
|
+
# @raise [Error] when no status matches +value+
|
|
20
|
+
def resolve(value)
|
|
21
|
+
return value if value.match?(UUID_RE)
|
|
22
|
+
|
|
23
|
+
status = statuses.find { |node| node["name"].casecmp?(value) }
|
|
24
|
+
status&.fetch("id") || raise(Error, not_found_message(value))
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
private
|
|
28
|
+
|
|
29
|
+
def statuses
|
|
30
|
+
client.query(self.class.query).dig(self.class.connection_name, "nodes") || []
|
|
31
|
+
end
|
|
10
32
|
end
|
|
11
33
|
end
|
|
12
34
|
end
|
|
@@ -27,7 +27,7 @@ module LinearToonMcp
|
|
|
27
27
|
priority: {type: "number", description: "0=None, 1=Urgent, 2=High, 3=Normal, 4=Low"},
|
|
28
28
|
state: {type: "string", description: "State name or ID"},
|
|
29
29
|
labels: {type: "array", items: {type: "string"}, description: "Label names or IDs"},
|
|
30
|
-
project: {type: "string", description: "Project name or ID"},
|
|
30
|
+
project: {type: ["string", "null"], description: "Project name or ID. Null to remove (update only)"},
|
|
31
31
|
cycle: {type: "string", description: "Cycle name, number, or ID"},
|
|
32
32
|
estimate: {type: "number", description: "Issue estimate value"},
|
|
33
33
|
dueDate: {type: "string", description: "Due date (ISO format)"},
|
|
@@ -200,8 +200,8 @@ module LinearToonMcp
|
|
|
200
200
|
input[:labelIds] = Resolvers::IssueLabel.call_many(values: kwargs[:labels], team_id: team_id)
|
|
201
201
|
end
|
|
202
202
|
project_id = nil
|
|
203
|
-
if kwargs.key?(:project)
|
|
204
|
-
project_id = Resolvers::Project.call(value: kwargs[:project])
|
|
203
|
+
if kwargs.key?(:project)
|
|
204
|
+
project_id = Resolvers::Project.call(value: kwargs[:project]) if kwargs[:project]
|
|
205
205
|
input[:projectId] = project_id
|
|
206
206
|
end
|
|
207
207
|
if kwargs.key?(:milestone)
|