Getting Started
1
Simple Usage
- Set
LINEAR_OAUTH_TOKENorLINEAR_API_KEY(see Authentication below) - Create an agent with Linear tool names (e.g.
linear_search_issues) - 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 textteam_id(str, optional): Filter by specific team IDstate_id(str, optional): Filter by issue stateassignee_id(str, optional): Filter by assigneelimit(int, optional): Maximum results to return (default: 20)
linear_get_issue
Get detailed information about a specific Linear issue. Parameters:issue_id(str): Linear issue ID or identifier (e.g., “ENG-42”)
linear_add_comment
Add a comment to an existing Linear issue. Parameters:issue_id(str): Issue ID to comment oncomment(str): Comment text (supports Markdown)
linear_update_issue
Update issue properties like status, assignee, priority, or description. Parameters:issue_id(str): Issue ID to updatetitle(str, optional): New issue titledescription(str, optional): New descriptionstate_id(str, optional): New state/status IDassignee_id(str, optional): New assignee user IDpriority(int, optional): Priority level (1-4)estimate(int, optional): Story point estimate
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
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: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
Store tokens in the environment
Store tokens in the environment
Read
LINEAR_OAUTH_TOKEN or LINEAR_API_KEY from the environment. Never hard-code credentials in the agent definition.Scope tools to the task
Scope tools to the task
Give the agent only the Linear tools it needs — a read-only agent should not include
linear_update_issue.Rely on built-in retries
Rely on built-in retries
Linear tools retry rate-limited requests with backoff. Keep prompts focused so the agent makes fewer, targeted calls.
Reference issues by identifier
Reference issues by identifier
Use identifiers like
ENG-42 so the agent targets the exact issue instead of relying on a fuzzy search.Related
Linear Bot
Webhook-based Linear integration
GitHub Tools
Combine with GitHub for complete workflows
Jira
Project management

