Linear
Query and create Linear issues from InTouch via the Linear GraphQL API.
- Endpoint:
POST https://api.linear.app/graphql - Auth:
Authorization: <API_KEY>— the personal API key is sent verbatim, with noBearerprefix (this is Linear's documented scheme). - Implementation: Python standard library only (
urllib). Response bodies are capped at ~5 MB.
Getting an API key
- In Linear, open Settings → Security & access → Personal API keys.
- Click New API key, name it (e.g.
intouch), and copy the key. - The key grants the access level of your own account. Pass it as the
apiKeyinput — InTouch never logs it, and it is sent only toapi.linear.app.
Operations
| operation | required inputs | optional inputs | what it does |
|---|---|---|---|
viewer |
— | — | Current authenticated user (id, name, email). Use it to confirm the key works. |
list-issues |
— | first (default 25) |
The viewer's assigned issues, most recently updated first. Each node includes team.id (needed for create-issue). |
get-issue |
issueId |
— | A single issue by id or identifier (e.g. ENG-123), including description, state, team, and assignee. |
search-issues |
query |
first (default 25) |
Full-text issue search (searchIssues). |
create-issue |
teamId, title |
description |
Creates an issue in the given team. Returns success and the new issue's identifier + url. |
first is clamped to 1–100.
The tool returns:
result— the GraphQLdatapayload as a JSON string (parse it downstream).status— the HTTP status code ("200"on success).
GraphQL logical errors (the errors array Linear returns even on HTTP 200) and
HTTP 4xx/5xx both cause the step to FAIL with an error message, so a bad key
or a missing team id surfaces clearly.
Usage examples
Confirm the key and find your team id
operation = viewer
apiKey = lin_api_xxxxxxxxxxxxxxxxxxxx
Then list your issues to grab a team.id:
operation = list-issues
apiKey = lin_api_xxxxxxxxxxxxxxxxxxxx
first = 10
Create an issue
operation = create-issue
apiKey = lin_api_xxxxxxxxxxxxxxxxxxxx
teamId = 9cfb482a-81e3-4154-b5b9-2c805e70a02d
title = Nightly backup failed on db-02
description = The 02:00 UTC backup job exited non-zero. See attached log.
The result payload contains issueCreate.success: true and the new issue's
identifier (e.g. OPS-412) and url.
Look up a specific issue
operation = get-issue
apiKey = lin_api_xxxxxxxxxxxxxxxxxxxx
issueId = OPS-412
Grounding
Built against the official Linear GraphQL reference:
https://linear.app/developers/graphql (formerly
https://developers.linear.app/docs).