Skip to main content
Glama

list_issues

Retrieve Linear issues with filters for team, assignee, or status to manage project tasks effectively.

Instructions

List issues with optional filters

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
teamIdNoFilter by team ID (optional)
assigneeIdNoFilter by assignee ID (optional)
statusNoFilter by status (optional)
firstNoNumber of issues to return (default: 50)

Implementation Reference

  • The main handler function for the 'list_issues' tool. It parses input arguments, constructs a filter for team, assignee, and status, queries the Linear API for issues, formats the results with additional details like status and assignee names, and returns the data as a JSON string in the MCP response format.
    case "list_issues": { const args = request.params.arguments as unknown as ListIssuesArgs; const filter: Record<string, any> = {}; if (args?.teamId) filter.team = { id: { eq: args.teamId } }; if (args?.assigneeId) filter.assignee = { id: { eq: args.assigneeId } }; if (args?.status) filter.state = { name: { eq: args.status } }; const issues = await linearClient.issues({ first: args?.first ?? 50, filter, }); const formattedIssues = await Promise.all( issues.nodes.map(async (issue) => { const state = await issue.state; const assignee = await issue.assignee; return { id: issue.id, title: issue.title, status: state ? await state.name : "Unknown", assignee: assignee ? assignee.name : "Unassigned", priority: issue.priority, url: issue.url, }; }) ); return { content: [ { type: "text", text: JSON.stringify(formattedIssues, null, 2), }, ], }; }
  • JSON schema defining the input parameters for the 'list_issues' tool, used for validation in MCP tool calls.
    inputSchema: { type: "object", properties: { teamId: { type: "string", description: "Filter by team ID (optional)", }, assigneeId: { type: "string", description: "Filter by assignee ID (optional)", }, status: { type: "string", description: "Filter by status (optional)", }, first: { type: "number", description: "Number of issues to return (default: 50)", }, }, },
  • src/index.ts:100-124 (registration)
    Registration of the 'list_issues' tool in the ListToolsRequestSchema handler, specifying name, description, and input schema.
    { name: "list_issues", description: "List issues with optional filters", inputSchema: { type: "object", properties: { teamId: { type: "string", description: "Filter by team ID (optional)", }, assigneeId: { type: "string", description: "Filter by assignee ID (optional)", }, status: { type: "string", description: "Filter by status (optional)", }, first: { type: "number", description: "Number of issues to return (default: 50)", }, }, }, },
  • src/index.ts:46-54 (registration)
    Capabilities declaration indicating support for the 'list_issues' tool among others.
    tools: { create_issue: true, list_issues: true, update_issue: true, list_teams: true, list_projects: true, search_issues: true, get_issue: true, },
  • TypeScript type definition for 'ListIssuesArgs' used for type casting input arguments in the handler.
    type ListIssuesArgs = { teamId?: string; assigneeId?: string; status?: string; first?: number; };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tiovikram/linear-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server