Skip to content

Commit 92f8be2

Browse files
authored
add Linear docs and examples (#355)
1 parent 7fbb1e4 commit 92f8be2

7 files changed

Lines changed: 189 additions & 1 deletion

File tree

pages/toolkits/productivity/_meta.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default {
99
google_drive: "Google Drive",
1010
google_sheets: "Google Sheets",
1111
jira: "Jira",
12+
linear: "Linear",
1213
notion: "Notion",
1314
obsidian: "Obsidian",
1415
outlook_calendar: "Outlook Calendar",
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Linear
2+
3+
import ToolInfo from "@/components/ToolInfo";
4+
import Badges from "@/components/Badges";
5+
import TabbedCodeBlock from "@/components/TabbedCodeBlock";
6+
import TableOfContents from "@/components/TableOfContents";
7+
import ToolFooter from "@/components/ToolFooter";
8+
9+
<ToolInfo
10+
description="Enable agents to interact with Linear"
11+
author="Arcade"
12+
codeLink="https://github.com/ArcadeAI/arcade-ai/tree/main/toolkits/linear"
13+
authType="OAuth2"
14+
versions={["0.1.0"]}
15+
/>
16+
17+
<Badges repo="arcadeai/arcade_linear" />
18+
19+
The Linear toolkit offers a streamlined set of tools for interacting with Linear's issue tracking and team management features. With this toolkit, users can:
20+
21+
- Retrieve detailed information about a specific issue, including their status, comments, and related dependencies.
22+
- Access comprehensive team information, including team members, roles, and settings.
23+
24+
This toolkit is ideal for users looking to read and analyze issue and team data within Linear without making any modifications.
25+
26+
## Available Tools
27+
28+
<TableOfContents
29+
headers={["Tool Name", "Description"]}
30+
data={
31+
[
32+
["Linear.GetIssue", "Get detailed information about a specific Linear issue"],
33+
["Linear.GetTeams", "Get Linear teams and team information including team members"],
34+
]
35+
}
36+
/>
37+
38+
<Tip>
39+
If you need to perform an action that's not listed here, you can [get in touch
40+
with us](mailto:contact@arcade.dev) to request a new tool, or [create your
41+
own tools](/home/build-tools/create-a-toolkit).
42+
</Tip>
43+
44+
## Linear.GetIssue
45+
46+
<br />
47+
<TabbedCodeBlock
48+
tabs={[
49+
{
50+
label: "Call the Tool Directly",
51+
content: {
52+
Python: ["/examples/integrations/toolkits/linear/get_issue_example_call_tool.py"],
53+
JavaScript: ["/examples/integrations/toolkits/linear/get_issue_example_call_tool.js"],
54+
},
55+
},
56+
]}
57+
/>
58+
59+
Get detailed information about a specific Linear issue
60+
61+
**Parameters**
62+
63+
- **issue_id** (`string`, required) The Linear issue ID or identifier (e.g. 'FE-123', 'API-456') to retrieve.
64+
- **include_comments** (`boolean`, optional) Whether to include comments in the response. Defaults to True.
65+
- **include_attachments** (`boolean`, optional) Whether to include attachments in the response. Defaults to True.
66+
- **include_relations** (`boolean`, optional) Whether to include issue relations (blocks, dependencies) in the response. Defaults to True.
67+
- **include_children** (`boolean`, optional) Whether to include sub-issues in the response. Defaults to True.
68+
69+
70+
## Linear.GetTeams
71+
72+
<br />
73+
<TabbedCodeBlock
74+
tabs={[
75+
{
76+
label: "Call the Tool Directly",
77+
content: {
78+
Python: ["/examples/integrations/toolkits/linear/get_teams_example_call_tool.py"],
79+
JavaScript: ["/examples/integrations/toolkits/linear/get_teams_example_call_tool.js"],
80+
},
81+
},
82+
]}
83+
/>
84+
85+
Get Linear teams and team information including team members
86+
87+
**Parameters**
88+
89+
- **team_name** (`string`, optional) Filter by team name. Provide specific team name (e.g. 'Frontend', 'Product Web') or partial name. Use this to find specific teams or check team membership. Defaults to None (all teams).
90+
- **include_archived** (`boolean`, optional) Whether to include archived teams in results. Defaults to False.
91+
- **created_after** (`string`, optional) Filter teams created after this date. Can be:
92+
- Relative date string (e.g. 'last month', 'this week', 'yesterday')
93+
- ISO date string (e.g. 'YYYY-MM-DD')
94+
Defaults to None (all time).
95+
- **limit** (`integer`, optional) Maximum number of teams to return. Min 1, max 100. Defaults to 50.
96+
- **end_cursor** (`string`, optional) Cursor for pagination - get teams after this cursor. Use the 'end_cursor' from previous response. Defaults to None (start from beginning).
97+
98+
99+
100+
101+
## Auth
102+
103+
The Arcade Linear toolkit uses the [Linear auth provider](/home/auth-providers/linear) to connect to users' Linear accounts. Please refer to the [Linear auth provider](/home/auth-providers/linear) documentation to learn how to configure auth.
104+
105+
<ToolFooter pipPackageName="arcade_linear" />
106+
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Arcade } from "@arcadeai/arcadejs";
2+
3+
const client = new Arcade(); // Automatically finds the `ARCADE_API_KEY` env variable
4+
5+
const USER_ID = "{arcade_user_id}"; // Unique identifier for your user (email, UUID, etc.)
6+
const TOOL_NAME = "Linear.GetIssue";
7+
8+
// Start the authorization process
9+
const authResponse = await client.tools.authorize({tool_name: TOOL_NAME});
10+
11+
if (authResponse.status !== "completed") {
12+
console.log(`Click this link to authorize: ${authResponse.url}`);
13+
}
14+
15+
// Wait for the authorization to complete
16+
await client.auth.waitForCompletion(authResponse);
17+
18+
const toolInput = {
19+
"issue": "PROJ-123"
20+
};
21+
22+
const response = await client.tools.execute({
23+
tool_name: TOOL_NAME,
24+
input: toolInput,
25+
user_id: USER_ID,
26+
});
27+
28+
console.log(JSON.stringify(response.output.value, null, 2));
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}" # Unique identifier for your user (email, UUID, etc.)
7+
TOOL_NAME = "Linear.GetIssue"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
"issue": "PROJ-123"
19+
}
20+
21+
response = client.tools.execute(
22+
tool_name=TOOL_NAME,
23+
input=tool_input,
24+
user_id=USER_ID,
25+
)
26+
print(json.dumps(response.output.value, indent=2))

public/examples/integrations/toolkits/linear/get_teams_example_call_tool.js

Whitespace-only changes.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import json
2+
from arcadepy import Arcade
3+
4+
client = Arcade() # Automatically finds the `ARCADE_API_KEY` env variable
5+
6+
USER_ID = "{arcade_user_id}" # Unique identifier for your user (email, UUID, etc.)
7+
TOOL_NAME = "Linear.GetTeams"
8+
9+
auth_response = client.tools.authorize(tool_name=TOOL_NAME)
10+
11+
if auth_response.status != "completed":
12+
print(f"Click this link to authorize: {auth_response.url}")
13+
14+
# Wait for the authorization to complete
15+
client.auth.wait_for_completion(auth_response)
16+
17+
tool_input = {
18+
"team_name": "Backend",
19+
"created_after": "December 21, 2012"
20+
}
21+
22+
response = client.tools.execute(
23+
tool_name=TOOL_NAME,
24+
input=tool_input,
25+
user_id=USER_ID,
26+
)
27+
print(json.dumps(response.output.value, indent=2))

src/components/custom/Toolkits/toolkits-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ const comingSoonTools: Tool[] = [
608608
link: "/toolkits/productivity/linear",
609609
category: "productivity",
610610
type: "arcade",
611-
isComingSoon: true,
611+
isComingSoon: false,
612612
},
613613
{
614614
name: "Mailchimp",

0 commit comments

Comments
 (0)