linear-toon-mcp 0.5.2 → 0.6.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 +1 -0
- data/lib/linear_toon_mcp/tools/list_comments.rb +64 -0
- data/lib/linear_toon_mcp/version.rb +1 -1
- data/lib/linear_toon_mcp.rb +2 -1
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3c8a4dfd15f2122d8742273f0a2b305d9f52f15b26173f177589348efcaceffb
|
|
4
|
+
data.tar.gz: 5f6f12e5bb56fe7c62cdabf552e110bd6b91dfabe0d0a6c241de074c5d1a02b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b163ae42837c5ae08eecf3b3897345f8c81312b7692a937ad0ef9586a42978155e2e1260fe7aeaa91d5fde1dddf29f0d0c5b8bad40658351dc925c017e4507ad
|
|
7
|
+
data.tar.gz: abd70a25debba62a651736fc0bfc018bda3171b3dc71070a2a4c17e5f2bd3476519def4f80dfb4c51853ad513ef9ecf898fc40aa3ad5630415144a9dd7e4e4a9
|
data/README.md
CHANGED
|
@@ -56,6 +56,7 @@ claude mcp add linear-toon -e LINEAR_API_KEY=lin_api_xxxxx -- linear-toon-mcp
|
|
|
56
56
|
| `create_issue` | Create a new Linear issue. Accepts human-friendly names for team, assignee, state, labels, project, cycle, and milestone (resolved to IDs automatically). Supports issue relations and link attachments. |
|
|
57
57
|
| `update_issue` | Update an existing Linear issue by ID. Supports partial updates, null to remove fields, and relation replacement. |
|
|
58
58
|
| `create_comment` | Create a comment on a Linear issue. Supports Markdown content and threaded replies via parentId. |
|
|
59
|
+
| `list_comments` | List comments for a specific Linear issue in chronological order. Returns each comment's id, body, author, and timestamps. |
|
|
59
60
|
|
|
60
61
|
## Development
|
|
61
62
|
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "toon"
|
|
4
|
+
|
|
5
|
+
module LinearToonMcp
|
|
6
|
+
module Tools
|
|
7
|
+
# List comments on a Linear issue in chronological order.
|
|
8
|
+
# Returns each comment's author, body, and timestamps.
|
|
9
|
+
class ListComments < MCP::Tool
|
|
10
|
+
description "List comments for a specific Linear issue"
|
|
11
|
+
|
|
12
|
+
annotations(
|
|
13
|
+
read_only_hint: true,
|
|
14
|
+
destructive_hint: false,
|
|
15
|
+
idempotent_hint: true
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
input_schema(
|
|
19
|
+
properties: {
|
|
20
|
+
issueId: {type: "string", description: "Issue ID or identifier (e.g., LIN-123)"}
|
|
21
|
+
},
|
|
22
|
+
required: ["issueId"],
|
|
23
|
+
additionalProperties: false
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
QUERY = <<~GRAPHQL
|
|
27
|
+
query($id: String!) {
|
|
28
|
+
issue(id: $id) {
|
|
29
|
+
comments(orderBy: createdAt) {
|
|
30
|
+
nodes {
|
|
31
|
+
id
|
|
32
|
+
body
|
|
33
|
+
createdAt
|
|
34
|
+
editedAt
|
|
35
|
+
user { id name }
|
|
36
|
+
}
|
|
37
|
+
pageInfo {
|
|
38
|
+
hasNextPage
|
|
39
|
+
endCursor
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
GRAPHQL
|
|
45
|
+
|
|
46
|
+
# standard:disable Naming/VariableName
|
|
47
|
+
class << self
|
|
48
|
+
# @param issueId [String] Linear issue ID or identifier (e.g., "LIN-123")
|
|
49
|
+
# @param server_context [Hash, nil] must contain +:client+ key with a {Client}
|
|
50
|
+
# @return [MCP::Tool::Response] TOON-encoded comments connection or error
|
|
51
|
+
def call(issueId:, server_context: nil)
|
|
52
|
+
client = server_context&.dig(:client) or raise Error, "client missing from server_context"
|
|
53
|
+
data = client.query(QUERY, variables: {id: issueId})
|
|
54
|
+
issue = data["issue"] or raise Error, "Issue not found: #{issueId}"
|
|
55
|
+
text = Toon.encode(issue["comments"])
|
|
56
|
+
MCP::Tool::Response.new([{type: "text", text:}])
|
|
57
|
+
rescue Error => e
|
|
58
|
+
MCP::Tool::Response.new([{type: "text", text: e.message}], error: true)
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
# standard:enable Naming/VariableName
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
data/lib/linear_toon_mcp.rb
CHANGED
|
@@ -7,6 +7,7 @@ require_relative "linear_toon_mcp/resolvers"
|
|
|
7
7
|
require_relative "linear_toon_mcp/tools/get_issue"
|
|
8
8
|
require_relative "linear_toon_mcp/tools/list_issues"
|
|
9
9
|
require_relative "linear_toon_mcp/tools/create_comment"
|
|
10
|
+
require_relative "linear_toon_mcp/tools/list_comments"
|
|
10
11
|
require_relative "linear_toon_mcp/tools/create_issue"
|
|
11
12
|
require_relative "linear_toon_mcp/tools/update_issue"
|
|
12
13
|
require_relative "linear_toon_mcp/tools/list_issue_statuses"
|
|
@@ -31,7 +32,7 @@ module LinearToonMcp
|
|
|
31
32
|
name: "linear-toon-mcp",
|
|
32
33
|
version: VERSION,
|
|
33
34
|
description: "Manage Linear issues, projects, and teams",
|
|
34
|
-
tools: [Tools::GetIssue, Tools::ListIssues, Tools::ListIssueStatuses, Tools::ListTeams, Tools::ListUsers, Tools::ListIssueLabels, Tools::ListProjects, Tools::ListCycles, Tools::GetProject, Tools::CreateComment, Tools::CreateIssue, Tools::UpdateIssue],
|
|
35
|
+
tools: [Tools::GetIssue, Tools::ListIssues, Tools::ListIssueStatuses, Tools::ListTeams, Tools::ListUsers, Tools::ListIssueLabels, Tools::ListProjects, Tools::ListCycles, Tools::GetProject, Tools::CreateComment, Tools::ListComments, Tools::CreateIssue, Tools::UpdateIssue],
|
|
35
36
|
server_context: {client:}
|
|
36
37
|
)
|
|
37
38
|
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: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Yevhenii Hurin
|
|
@@ -15,14 +15,14 @@ dependencies:
|
|
|
15
15
|
requirements:
|
|
16
16
|
- - "~>"
|
|
17
17
|
- !ruby/object:Gem::Version
|
|
18
|
-
version: '0.
|
|
18
|
+
version: '0.11'
|
|
19
19
|
type: :runtime
|
|
20
20
|
prerelease: false
|
|
21
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
22
22
|
requirements:
|
|
23
23
|
- - "~>"
|
|
24
24
|
- !ruby/object:Gem::Version
|
|
25
|
-
version: '0.
|
|
25
|
+
version: '0.11'
|
|
26
26
|
- !ruby/object:Gem::Dependency
|
|
27
27
|
name: openssl
|
|
28
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -70,6 +70,7 @@ files:
|
|
|
70
70
|
- lib/linear_toon_mcp/tools/create_issue.rb
|
|
71
71
|
- lib/linear_toon_mcp/tools/get_issue.rb
|
|
72
72
|
- lib/linear_toon_mcp/tools/get_project.rb
|
|
73
|
+
- lib/linear_toon_mcp/tools/list_comments.rb
|
|
73
74
|
- lib/linear_toon_mcp/tools/list_cycles.rb
|
|
74
75
|
- lib/linear_toon_mcp/tools/list_issue_labels.rb
|
|
75
76
|
- lib/linear_toon_mcp/tools/list_issue_statuses.rb
|