Skip to main content
Linear tools provide comprehensive issue management capabilities through Linear’s GraphQL API, enabling agents to search, create, update, and comment on issues across teams. The user asks about issues or requests an update; the agent queries Linear and returns the result or confirms the change.

Getting Started

1

Simple Usage

  1. Set LINEAR_OAUTH_TOKEN or LINEAR_API_KEY (see Authentication below)
  2. Create an agent with Linear tool names (e.g. linear_search_issues)
  3. Run a prompt — see Complete Linear Agent Example below
2

With Configuration

Use OAuth or API key precedence from Authentication, and combine tools from Issue Management and Team and Workflow.

Authentication

Linear tools support both OAuth tokens and personal API keys with automatic precedence:
OAuth tokens are sent as Bearer <token> while API keys are sent raw. OAuth tokens take precedence if both are configured.

Issue Management

linear_search_issues

Search Linear issues by text, status, team, or other criteria. Parameters:
  • query (str): Search query text
  • team_id (str, optional): Filter by specific team ID
  • state_id (str, optional): Filter by issue state
  • assignee_id (str, optional): Filter by assignee
  • limit (int, optional): Maximum results to return (default: 20)
Returns: List of issue objects with ID, title, description, status, and metadata.

linear_get_issue

Get detailed information about a specific Linear issue. Parameters:
  • issue_id (str): Linear issue ID or identifier (e.g., “ENG-42”)
Returns: Complete issue object with title, description, comments, attachments, and relationships.

linear_add_comment

Add a comment to an existing Linear issue. Parameters:
  • issue_id (str): Issue ID to comment on
  • comment (str): Comment text (supports Markdown)
Returns: Created comment object with ID and URL.

linear_update_issue

Update issue properties like status, assignee, priority, or description. Parameters:
  • issue_id (str): Issue ID to update
  • title (str, optional): New issue title
  • description (str, optional): New description
  • state_id (str, optional): New state/status ID
  • assignee_id (str, optional): New assignee user ID
  • priority (int, optional): Priority level (1-4)
  • estimate (int, optional): Story point estimate
Returns: Updated issue object.

Team and Workflow

linear_list_teams

Get all teams in the Linear workspace. Parameters: None Returns: List of team objects with IDs, names, and metadata.

linear_list_issue_states

Get available issue states for workflow management. Parameters:
  • team_id (str, optional): Filter states for specific team
Returns: List of state objects with IDs, names, colors, and workflow positions.

Complete Linear Agent Example

Here’s a comprehensive agent that combines multiple Linear tools:

Integration with LinearBot

These tools work seamlessly with the LinearBot for automated issue management:
Use Linear tools alongside the LinearBot for complete issue-to-code automation workflows.

Error Handling

Linear tools handle common API errors gracefully:
  • Authentication errors → Clear messages about token configuration
  • Rate limiting → Automatic retry with exponential backoff
  • Invalid IDs → Helpful suggestions for finding correct identifiers
  • Permission errors → Specific guidance on required scopes

How It Works


Best Practices

Read LINEAR_OAUTH_TOKEN or LINEAR_API_KEY from the environment. Never hard-code credentials in the agent definition.
Give the agent only the Linear tools it needs — a read-only agent should not include linear_update_issue.
Linear tools retry rate-limited requests with backoff. Keep prompts focused so the agent makes fewer, targeted calls.
Use identifiers like ENG-42 so the agent targets the exact issue instead of relying on a fuzzy search.

Linear Bot

Webhook-based Linear integration

GitHub Tools

Combine with GitHub for complete workflows

Jira

Project management