search_issues
Search Linear issues using text queries to find and retrieve relevant tickets for project management and tracking.
Instructions
Search for issues using a text query
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query text | |
| first | No | Number of results to return (default: 50) |
Implementation Reference
- src/index.ts:409-443 (handler)The switch case handler for the 'search_issues' tool. Validates input arguments, calls LinearClient.searchIssues with the query, formats the search results (including id, title, status, assignee, priority, url, metadata), and returns as JSON text content.case "search_issues": { const args = request.params.arguments as unknown as SearchIssuesArgs; if (!args?.query) { throw new Error("Search query is required"); } const searchResults = await linearClient.searchIssues(args.query, { first: args?.first ?? 50, }); const formattedResults = await Promise.all( searchResults.nodes.map(async (result) => { const state = await result.state; const assignee = await result.assignee; return { id: result.id, title: result.title, status: state ? await state.name : "Unknown", assignee: assignee ? assignee.name : "Unassigned", priority: result.priority, url: result.url, metadata: result.metadata, }; }) ); return { content: [ { type: "text", text: JSON.stringify(formattedResults, null, 2), }, ], }; }
- src/index.ts:189-202 (schema)The input schema definition for the 'search_issues' tool as provided in the tool registration, specifying the expected arguments (query required, first optional).inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query text", }, first: { type: "number", description: "Number of results to return (default: 50)", }, }, required: ["query"], },
- src/index.ts:186-203 (registration)The full tool object registration for 'search_issues' in the ListTools response, including name, description, and input schema.{ name: "search_issues", description: "Search for issues using a text query", inputSchema: { type: "object", properties: { query: { type: "string", description: "Search query text", }, first: { type: "number", description: "Number of results to return (default: 50)", }, }, required: ["query"], }, },
- src/index.ts:251-254 (schema)TypeScript type definition matching the input schema for SearchIssuesArgs used in the handler for type safety.type SearchIssuesArgs = { query: string; first?: number; };
- src/index.ts:52-52 (registration)Capability flag in server capabilities declaring support for the 'search_issues' tool.search_issues: true,