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: f153b22caa9c1df3508d6ee6e5e515c9233a45bb46e85cfe23dc4293f552eca1
4
- data.tar.gz: 1b28577e054f4aa6759b1cd1a78f6ae189d78c94ec3f39b65abaaf28a4362128
3
+ metadata.gz: 2c8f7853b331d24b32b67d2f6f5db8fae9c4833a25470011019463c69c621fac
4
+ data.tar.gz: '058de398a53a8109347de0ac55f75d6407a2a65e07cbdd10cd8a65754ae99009'
5
5
  SHA512:
6
- metadata.gz: 9edb2ad3b2bdec827ccd31c4bd18466e8d5c2e3ece9b6568d62ef21faa2262ffc7c3f4fdc98053993845485412f0ac2ed59ffb40db7478ff27668513dc716b6c
7
- data.tar.gz: d765472c7885e39684d40ed9543fc73b30e8475c7e62af7cf6818d9bf61acf0fe6d135df2c500f71b54d7456d00e8c6ffac09f1f9dd0a92e5a3993b5e2adb4ec
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 the value
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
- filter_type :ProjectStatusFilter
9
- lookup_by :name
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) && kwargs[: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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module LinearToonMcp
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
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.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yevhenii Hurin