Skip to main content
Glama

get_tasks

Retrieve tasks from Linear with filters for status, assignee, team, or result count to manage workflow efficiently.

Instructions

Get tasks from Linear with optional filtering

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by status (e.g., "Todo", "In Progress", "Done")
assigneeNoFilter by assignee name or ID
teamNoFilter by team name or ID
limitNoMaximum number of tasks to return (default: 20)

Implementation Reference

  • The handler function that executes the get_tasks tool logic: filters and fetches tasks (issues) from Linear API, formats them, and returns as JSON.
    private async handleGetTasks(args: any) {
      const limit = args?.limit || 20;
      
      // Build the filter
      let filter: Record<string, any> = {};
      
      if (args?.status) {
        // Get workflow states to map status name to ID
        const workflowStates = await linearClient.workflowStates();
        const state = workflowStates.nodes.find(
          (s) => s.name.toLowerCase() === args.status.toLowerCase()
        );
        if (state) {
          filter.stateId = { eq: state.id };
        }
      }
      
      if (args?.assignee) {
        const users = await linearClient.users();
        const user = users.nodes.find(
          (u) => u.name.toLowerCase().includes(args.assignee.toLowerCase()) || 
                 u.id === args.assignee
        );
        if (user) {
          filter.assigneeId = { eq: user.id };
        }
      }
      
      if (args?.team) {
        const teams = await linearClient.teams();
        const team = teams.nodes.find(
          (t) => t.name.toLowerCase().includes(args.team.toLowerCase()) || 
                 t.id === args.team
        );
        if (team) {
          filter.teamId = { eq: team.id };
        }
      }
    
      // Fetch issues with the filter
      const issues = await linearClient.issues({
        filter,
        first: limit,
      });
    
      // Format the response
      const formattedIssues = await Promise.all(
        issues.nodes.map(async (issue) => {
          const assignee = issue.assignee ? await issue.assignee : null;
          const team = issue.team ? await issue.team : null;
          const state = issue.state ? await issue.state : null;
          
          return {
            id: issue.id,
            title: issue.title,
            description: issue.description,
            status: state ? state.name : null,
            assignee: assignee ? assignee.name : null,
            team: team ? team.name : null,
            createdAt: issue.createdAt,
            updatedAt: issue.updatedAt,
            url: issue.url,
          };
        })
      );
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(formattedIssues, null, 2),
          },
        ],
      };
    }
  • The input schema and metadata for the get_tasks tool, defined in the ListTools response.
    {
      name: 'get_tasks',
      description: 'Get tasks from Linear with optional filtering',
      inputSchema: {
        type: 'object',
        properties: {
          status: {
            type: 'string',
            description: 'Filter by status (e.g., "Todo", "In Progress", "Done")',
          },
          assignee: {
            type: 'string',
            description: 'Filter by assignee name or ID',
          },
          team: {
            type: 'string',
            description: 'Filter by team name or ID',
          },
          limit: {
            type: 'number',
            description: 'Maximum number of tasks to return (default: 20)',
            minimum: 1,
            maximum: 100,
          },
        },
      },
    },
  • src/index.ts:114-116 (registration)
    Registration of the get_tasks handler in the CallToolRequestSchema switch statement.
    case 'get_tasks':
      return await this.handleGetTasks(request.params.arguments);
    case 'get_task_details':
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a 'get' operation which implies read-only, but doesn't mention authentication requirements, rate limits, pagination behavior (beyond the limit parameter), error conditions, or what happens when no filters are applied. For a tool with 4 parameters and no annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at just 6 words, front-loading the core purpose. Every word earns its place - 'Get tasks' (action), 'from Linear' (source), 'with optional filtering' (capability). No wasted words or unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 4 parameters, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'tasks' means in the Linear context, what data is returned, how results are structured, or provide any behavioral context. The agent would need to guess about authentication, error handling, and result format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all parameters are documented in the schema. The description adds minimal value beyond stating 'optional filtering' - it doesn't explain how filters combine, precedence, or provide examples beyond what the schema already contains. Baseline 3 is appropriate when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get tasks') and resource ('from Linear'), making the purpose understandable. However, it doesn't differentiate this tool from its sibling 'get_task_details' - both involve retrieving task information, so the distinction isn't explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions 'optional filtering' which implies some usage context, but provides no guidance on when to use this tool versus alternatives like 'get_task_details' for detailed task information or 'get_teams'/'get_users' for related data. No explicit when/when-not instructions are present.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/Tyru5/linear-mcp'

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