Skip to main content
Glama

linear_addProjectToInitiative

Link a project to an initiative in Linear to organize related work under strategic goals. Specify the initiative and project IDs to establish the connection.

Instructions

Add a project to an initiative

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
initiativeIdYesThe ID of the initiative
projectIdYesThe ID of the project to add

Implementation Reference

  • The core handler function for the linear_addProjectToInitiative tool. Validates input using type guard and delegates to LinearService.addProjectToInitiative.
    export function addProjectToInitiativeHandler(linearService: LinearService) { return async (args: unknown) => { if (!isAddProjectToInitiativeInput(args)) { throw new Error('Invalid input for addProjectToInitiative'); } console.log( `[addProjectToInitiative] Adding project ${args.projectId} to initiative ${args.initiativeId}`, ); const result = await linearService.addProjectToInitiative(args.initiativeId, args.projectId); console.log(`[addProjectToInitiative] Project added successfully`); return result; }; }
  • MCP tool definition including input and output schemas for linear_addProjectToInitiative.
    name: 'linear_addProjectToInitiative', description: 'Add a project to an initiative', input_schema: { type: 'object', properties: { initiativeId: { type: 'string', description: 'The ID of the initiative', }, projectId: { type: 'string', description: 'The ID of the project to add', }, }, required: ['initiativeId', 'projectId'], }, output_schema: { type: 'object', properties: { success: { type: 'boolean' }, project: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, initiative: { type: 'object', properties: { id: { type: 'string' }, name: { type: 'string' }, }, }, }, }, }, }, },
  • Registration of the tool handler in the main tool handlers map.
    linear_addProjectToInitiative: addProjectToInitiativeHandler(linearService),
  • Type guard function used in the handler to validate input arguments for linear_addProjectToInitiative.
    export function isAddProjectToInitiativeInput(args: unknown): args is { initiativeId: string; projectId: string; } { return ( typeof args === 'object' && args !== null && 'initiativeId' in args && typeof (args as { initiativeId: string }).initiativeId === 'string' && 'projectId' in args && typeof (args as { projectId: string }).projectId === 'string' ); }

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