Skip to main content
Glama

get_task_details

Retrieve detailed information about a specific Linear task by providing its ID to access status, description, and related data from your workspace.

Instructions

Get detailed information about a specific task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdYesThe ID of the task to retrieve details for

Implementation Reference

  • The handler function that executes the 'get_task_details' tool. Validates input, fetches task details from Linear API, enriches with related data, formats as JSON, and returns MCP response.
    private async handleGetTaskDetails(args: any) {
      if (!args?.taskId) {
        throw new McpError(
          ErrorCode.InvalidParams,
          'taskId is required'
        );
      }
    
      const issue = await linearClient.issue(args.taskId);
      if (!issue) {
        throw new McpError(
          ErrorCode.InvalidRequest,
          `Task with ID ${args.taskId} not found`
        );
      }
    
      const assignee = issue.assignee ? await issue.assignee : null;
      const team = issue.team ? await issue.team : null;
      const state = issue.state ? await issue.state : null;
      const comments = await issue.comments();
      const attachments = await issue.attachments();
      const labels = await issue.labels();
    
      const formattedIssue = {
        id: issue.id,
        title: issue.title,
        description: issue.description,
        status: state ? state.name : null,
        assignee: assignee ? {
          id: assignee.id,
          name: assignee.name,
          email: assignee.email,
        } : null,
        team: team ? {
          id: team.id,
          name: team.name,
        } : null,
        priority: issue.priority,
        createdAt: issue.createdAt,
        updatedAt: issue.updatedAt,
        dueDate: issue.dueDate,
        estimate: issue.estimate,
        url: issue.url,
        comments: comments.nodes.map(comment => ({
          id: comment.id,
          body: comment.body,
          createdAt: comment.createdAt,
          userId: comment.userId,
        })),
        attachments: attachments.nodes.map(attachment => ({
          id: attachment.id,
          title: attachment.title,
          url: attachment.url,
        })),
        labels: labels.nodes.map(label => ({
          id: label.id,
          name: label.name,
          color: label.color,
        })),
      };
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(formattedIssue, null, 2),
          },
        ],
      };
    }
  • Input schema for the 'get_task_details' tool defining the required 'taskId' parameter.
    inputSchema: {
      type: 'object',
      properties: {
        taskId: {
          type: 'string',
          description: 'The ID of the task to retrieve details for',
        },
      },
      required: ['taskId'],
    },
  • src/index.ts:78-91 (registration)
    Registration of the 'get_task_details' tool in the ListToolsRequestSchema handler, including name, description, and schema.
    {
      name: 'get_task_details',
      description: 'Get detailed information about a specific task',
      inputSchema: {
        type: 'object',
        properties: {
          taskId: {
            type: 'string',
            description: 'The ID of the task to retrieve details for',
          },
        },
        required: ['taskId'],
      },
    },
  • src/index.ts:116-117 (registration)
    Dispatch/registration in the CallToolRequestSchema switch statement that routes 'get_task_details' calls to the handler.
    case 'get_task_details':
      return await this.handleGetTaskDetails(request.params.arguments);
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