open-swe/agent/tools/linear_search_issues.py
Adam Moussa bfb36be948
feat: add Linear issue search tool (#1748)
Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com>
(cherry picked from commit 79df6b2ff283afdbd36660be888c130ea964fe3f)

Co-authored-by: Johannes du Plessis <johannes@langchain.dev>
2026-07-17 16:22:38 -04:00

34 lines
1.1 KiB
Python

from typing import Any
from ..utils.linear import search_issues
async def linear_search_issues(
query: str,
team_id: str | None = None,
limit: int = 10,
include_archived: bool = False,
include_comments: bool = False,
after: str | None = None,
) -> dict[str, Any]:
"""Search Linear issues by title, description, and optionally comments.
Args:
query: Free-text search query.
team_id: Optional team UUID used to restrict matches to that team.
limit: Maximum results to return, from 1 to 50.
include_archived: Whether to include archived issues.
include_comments: Whether to search issue comments in addition to issue content.
after: Optional pagination cursor from a previous result's page_info.endCursor.
Returns:
Matching issues plus total_count and page_info for pagination.
"""
return await search_issues(
query=query,
team_id=team_id,
limit=limit,
include_archived=include_archived,
include_comments=include_comments,
after=after,
)