Skip to main content
Glama

linear_getProjects

Retrieve a list of projects from Linear to manage tasks and track progress. This tool integrates with the Linear project management system for streamlined access to project details.

Instructions

Get a list of projects from Linear

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the linear_getProjects tool, wrapping the LinearService.getProjects() call with error handling.
    export function handleGetProjects(linearService: LinearService) { return async (args: unknown) => { try { return await linearService.getProjects(); } catch (error) { logError('Error getting projects', error); throw error; } }; }
  • Tool schema definition including input (empty) and output schema for projects list with details like id, name, teams, etc.
    export const getProjectsToolDefinition: MCPToolDefinition = { name: 'linear_getProjects', description: 'Get a list of projects from Linear', input_schema: { type: 'object', properties: {}, }, output_schema: { type: 'array', items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, description: { type: 'string' }, content: { type: 'string' }, state: { type: 'string' }, teams: { type: 'array', items: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, }, }, }, url: { type: 'string' }, }, }, }, };
  • LinearService method that fetches projects from Linear API using GraphQL client, resolves teams for each project, and formats the response.
    async getProjects() { const projects = await this.client.projects(); return Promise.all( projects.nodes.map(async (project) => { // We need to fetch teams using the relationship const teams = await project.teams(); return { id: project.id, name: project.name, description: project.description, content: project.content, state: project.state, teams: teams.nodes.map((team) => ({ id: team.id, name: team.name, })), }; }), ); }
  • Registration of the linear_getProjects tool handler in the registerToolHandlers function, mapping the tool name to the handler.
    linear_getProjects: handleGetProjects(linearService),

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

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