export function getRemoteLinearReadHelp(commandPath: string[]): string | null { if (commandPath.length === 1 && commandPath[0] === 'linear') { return LINEAR_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'issue')) { return LINEAR_ISSUE_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'list-issues')) { return LINEAR_MCP_ISSUE_LIST_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'search')) { return LINEAR_SEARCH_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'team', 'list')) { return LINEAR_TEAM_LIST_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'team', 'members')) { return LINEAR_TEAM_MEMBERS_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'team', 'states')) { return LINEAR_TEAM_STATES_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'team', 'labels')) { return LINEAR_TEAM_LABELS_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'project', 'list')) { return LINEAR_PROJECT_LIST_HELP } if (matchesRemoteCommand(commandPath, 'linear', 'list')) { return LINEAR_LIST_HELP } return null } function matchesRemoteCommand(commandPath: string[], ...command: string[]): boolean { return ( commandPath.length === command.length && command.every((part, index) => commandPath[index] === part) ) } const LINEAR_HELP = `orca linear Usage: orca linear [options] Commands: save-issue Create or update a Linear issue list-issues List Linear issues with MCP-compatible filters relation add Add a Linear issue relation relation remove Remove a Linear issue relation issue Read Linear issue context for agents search Search connected Linear workspaces team list List connected Linear teams team members List Linear team members team states List Linear team workflow states team labels List Linear team labels project list List connected Linear projects list List Linear issues assignee set Set a Linear issue assignee assignee clear Clear a Linear issue assignee priority set Set a Linear issue priority priority clear Clear a Linear issue priority estimate set Set a Linear issue estimate estimate clear Clear a Linear issue estimate due-date set Set a Linear issue due date due-date clear Clear a Linear issue due date label add Add labels to a Linear issue label remove Remove labels from a Linear issue label set Replace labels on a Linear issue status set Set a Linear issue status comment add Add a comment to a Linear issue attach Attach a link to a Linear issue create Create a Linear issue Run \`orca linear --help\` for command-specific usage.` const LINEAR_ISSUE_HELP = `orca linear issue Usage: orca linear issue [] [--current] [--comments] [--children] [--depth ] [--attachments] [--relations] [--activity] [--full] [--workspace ] [--json] Read Linear issue context for agents Options: --help Show this help message --json Emit machine-readable JSON --pairing-code --environment --current Use the current Orca worktree linked Linear issue --comments Include threaded Linear comments --children Include recursive child issues --depth Child issue depth for --children/--full --attachments Include attachment metadata and URLs --relations Include blocking, related, and duplicate links --activity Include issue field-change history --full Include all supported V1 issue context within caps --workspace Connected Linear workspace id --id Linear issue key, id, or URL Examples: $ orca linear issue ENG-123 $ orca linear issue --current --comments $ orca linear issue https://linear.app/acme/issue/ENG-123 --full --json` const LINEAR_MCP_ISSUE_LIST_HELP = `orca linear list-issues Usage: orca linear list-issues [--team ] [--cycle ] [--label