linear
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineselinear
Linear
MCP skill for linear. Provides 31 tools: get_attachment, create_attachment, delete_attachment, list_comments, save_comment, delete_comment, list_cycles, get_document, list_documents, create_document, update_document, extract_images, get_issue, list_issues, save_issue, list_issue_statuses, get_issue_status, list_issue_labels, create_issue_label, list_projects, get_project, save_project, list_project_labels, list_milestones, get_milestone, save_milestone, list_teams, get_team, list_users, get_user, search_documentation
面向Linear的MCP Skill。提供31种工具:get_attachment、create_attachment、delete_attachment、list_comments、save_comment、delete_comment、list_cycles、get_document、list_documents、create_document、update_document、extract_images、get_issue、list_issues、save_issue、list_issue_statuses、get_issue_status、list_issue_labels、create_issue_label、list_projects、get_project、save_project、list_project_labels、list_milestones、get_milestone、save_milestone、list_teams、get_team、list_users、get_user、search_documentation
Authentication
认证方式
This MCP server uses OAuth authentication.
The OAuth flow is handled automatically by the MCP client. Tokens are persisted
to so subsequent runs reuse the same credentials without
re-authenticating.
~/.mcp-skill/auth/python
app = LinearApp() # uses default OAuth flowTo bring your own OAuth provider, pass it via the argument:
authpython
app = LinearApp(auth=my_oauth_provider)本MCP服务器采用OAuth认证方式。
OAuth流程由MCP客户端自动处理。令牌会持久化存储到目录,因此后续运行时可复用相同凭证,无需重新认证。
~/.mcp-skill/auth/python
app = LinearApp() # uses default OAuth flow若要使用自定义OAuth服务提供商,可通过参数传入:
authpython
app = LinearApp(auth=my_oauth_provider)Dependencies
依赖项
This skill requires the following Python packages:
mcp-skill
Install with uv:
bash
uv pip install mcp-skillOr with pip:
bash
pip install mcp-skill本Skill需要以下Python包:
mcp-skill
使用uv安装:
bash
uv pip install mcp-skill或使用pip安装:
bash
pip install mcp-skillHow to Run
运行方法
Important: Add to your Python path so imports resolve correctly:
.agents/skillspython
import sys
sys.path.insert(0, ".agents/skills")
from linear.app import LinearAppOr set the environment variable:
PYTHONPATHbash
export PYTHONPATH=".agents/skills:$PYTHONPATH"Preferred: use (handles dependencies automatically):
uv runbash
PYTHONPATH=.agents/skills uv run --with mcp-skill python -c "
import asyncio
from linear.app import LinearApp
async def main():
app = LinearApp()
result = await app.get_attachment(id="example")
print(result)
asyncio.run(main())
"Alternative: use directly (install dependencies first):
pythonbash
pip install mcp-skill
PYTHONPATH=.agents/skills python -c "
import asyncio
from linear.app import LinearApp
async def main():
app = LinearApp()
result = await app.get_attachment(id="example")
print(result)
asyncio.run(main())
"重要提示: 将添加到Python路径,确保导入能正确解析:
.agents/skillspython
import sys
sys.path.insert(0, ".agents/skills")
from linear.app import LinearApp或设置环境变量:
PYTHONPATHbash
export PYTHONPATH=".agents/skills:$PYTHONPATH"推荐方式:使用(自动处理依赖):
uv runbash
PYTHONPATH=.agents/skills uv run --with mcp-skill python -c "
import asyncio
from linear.app import LinearApp
async def main():
app = LinearApp()
result = await app.get_attachment(id='example')
print(result)
asyncio.run(main())
"替代方式:直接使用(需先安装依赖):
pythonbash
pip install mcp-skill
PYTHONPATH=.agents/skills python -c "
import asyncio
from linear.app import LinearApp
async def main():
app = LinearApp()
result = await app.get_attachment(id='example')
print(result)
asyncio.run(main())
"Available Tools
可用工具
get_attachment
get_attachment
Retrieve an attachment's content by ID.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Attachment ID |
Example:
python
result = await app.get_attachment(id="example")通过ID获取附件内容。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 附件ID |
示例:
python
result = await app.get_attachment(id='example')create_attachment
create_attachment
Create a new attachment on a specific Linear issue by uploading base64-encoded content.
| Parameter | Type | Required | Description |
|---|---|---|---|
| issue | | Yes | Issue ID or identifier (e.g., LIN-123) |
| base64Content | | Yes | Base64-encoded file content to upload |
| filename | | Yes | Filename for the upload (e.g., 'screenshot.png') |
| contentType | | Yes | MIME type for the upload (e.g., 'image/png', 'application/pdf') |
| title | | No | Optional title for the attachment |
| subtitle | | No | Optional subtitle for the attachment |
Example:
python
result = await app.create_attachment(issue="example", base64Content="example", filename="example")通过上传Base64编码内容,在指定Linear问题中创建新附件。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| issue | | 是 | 问题ID或标识符(例如:LIN-123) |
| base64Content | | 是 | 待上传文件的Base64编码内容 |
| filename | | 是 | 上传文件的文件名(例如:'screenshot.png') |
| contentType | | 是 | 上传文件的MIME类型(例如:'image/png'、'application/pdf') |
| title | | 否 | 附件的可选标题 |
| subtitle | | 否 | 附件的可选副标题 |
示例:
python
result = await app.create_attachment(issue='example', base64Content='example', filename='example')delete_attachment
delete_attachment
Delete an attachment by ID
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Attachment ID |
Example:
python
result = await app.delete_attachment(id="example")通过ID删除附件
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 附件ID |
示例:
python
result = await app.delete_attachment(id='example')list_comments
list_comments
List comments for a specific Linear issue
| Parameter | Type | Required | Description |
|---|---|---|---|
| issueId | | Yes | Issue ID |
Example:
python
result = await app.list_comments(issueId="example")列出指定Linear问题的所有评论
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| issueId | | 是 | 问题ID |
示例:
python
result = await app.list_comments(issueId='example')save_comment
save_comment
Create or update a comment on a Linear issue. If is provided, updates the existing comment; otherwise creates a new one. When creating, and are required.
idissueIdbody| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | No | Comment ID. If provided, updates the existing comment |
| issueId | | No | Issue ID (required when creating) |
| parentId | | No | Parent comment ID (for replies, only when creating) |
| body | | Yes | Content as Markdown |
Example:
python
result = await app.save_comment(id="example", issueId="example", parentId="example")在Linear问题中创建或更新评论。若提供则更新现有评论,否则创建新评论。创建时需提供和。
idissueIdbody| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 否 | 评论ID。若提供则更新现有评论 |
| issueId | | 否 | 问题ID(创建时必填) |
| parentId | | 否 | 父评论ID(仅创建回复时需提供) |
| body | | 是 | Markdown格式的评论内容 |
示例:
python
result = await app.save_comment(id='example', issueId='example', parentId='example')delete_comment
delete_comment
Delete a comment from a Linear issue
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Comment ID |
Example:
python
result = await app.delete_comment(id="example")从Linear问题中删除评论
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 评论ID |
示例:
python
result = await app.delete_comment(id='example')list_cycles
list_cycles
Retrieve cycles for a specific Linear team
| Parameter | Type | Required | Description |
|---|---|---|---|
| teamId | | Yes | Team ID |
| type | | No | Filter: current, previous, next, or all |
Example:
python
result = await app.list_cycles(teamId="example", type="example")获取指定Linear团队的迭代周期
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| teamId | | 是 | 团队ID |
| type | | 否 | 筛选条件:current(当前)、previous(上一个)、next(下一个)或all(全部) |
示例:
python
result = await app.list_cycles(teamId='example', type='example')get_document
get_document
Retrieve a Linear document by ID or slug
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Document ID or slug |
Example:
python
result = await app.get_document(id="example")通过ID或别名获取Linear文档
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 文档ID或别名 |
示例:
python
result = await app.get_document(id='example')list_documents
list_documents
List documents in the user's Linear workspace
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | | No | Max results (default 50, max 250) |
| cursor | | No | Next page cursor |
| orderBy | | No | Sort: createdAt |
| query | | No | Search query |
| projectId | | No | Filter by project ID |
| initiativeId | | No | Filter by initiative ID |
| creatorId | | No | Filter by creator ID |
| createdAt | | No | Created after: ISO-8601 date/duration (e.g., -P1D) |
| updatedAt | | No | Updated after: ISO-8601 date/duration (e.g., -P1D) |
| includeArchived | | No | Include archived items |
Example:
python
result = await app.list_documents(limit=1.0, cursor="example", orderBy="example")列出用户Linear工作区中的所有文档
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| limit | | 否 | 最大结果数(默认50,上限250) |
| cursor | | 否 | 下一页游标 |
| orderBy | | 否 | 排序方式:createdAt(创建时间) |
| query | | 否 | 搜索关键词 |
| projectId | | 否 | 按项目ID筛选 |
| initiativeId | | 否 | 按倡议ID筛选 |
| creatorId | | 否 | 按创建者ID筛选 |
| createdAt | | 否 | 筛选创建时间晚于指定值:ISO-8601格式日期/时长(例如:-P1D) |
| updatedAt | | 否 | 筛选更新时间晚于指定值:ISO-8601格式日期/时长(例如:-P1D) |
| includeArchived | | 否 | 是否包含已归档项 |
示例:
python
result = await app.list_documents(limit=1.0, cursor='example', orderBy='example')create_document
create_document
Create a new document in Linear
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | | Yes | Document title |
| content | | No | Content as Markdown |
| project | | No | Project name, ID, or slug |
| issue | | No | Issue ID or identifier (e.g., LIN-123) |
| icon | | No | Icon emoji |
| color | | No | Hex color |
Example:
python
result = await app.create_document(title="example", content="example", project="example")在Linear中创建新文档
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| title | | 是 | 文档标题 |
| content | | 否 | Markdown格式的文档内容 |
| project | | 否 | 项目名称、ID或别名 |
| issue | | 否 | 问题ID或标识符(例如:LIN-123) |
| icon | | 否 | 图标emoji |
| color | | 否 | 十六进制颜色码 |
示例:
python
result = await app.create_document(title='example', content='example', project='example')update_document
update_document
Update an existing Linear document
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Document ID or slug |
| title | | No | Document title |
| content | | No | Content as Markdown |
| project | | No | Project name, ID, or slug |
| icon | | No | Icon emoji |
| color | | No | Hex color |
Example:
python
result = await app.update_document(id="example", title="example", content="example")更新Linear中的现有文档
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 文档ID或别名 |
| title | | 否 | 文档标题 |
| content | | 否 | Markdown格式的文档内容 |
| project | | 否 | 项目名称、ID或别名 |
| icon | | 否 | 图标emoji |
| color | | 否 | 十六进制颜色码 |
示例:
python
result = await app.update_document(id='example', title='example', content='example')extract_images
extract_images
Extract and fetch images from markdown content. Use this to view screenshots, diagrams, or other images embedded in Linear issues, comments, or documents. Pass the markdown content (e.g., issue description) and receive the images as viewable data.
| Parameter | Type | Required | Description |
|---|---|---|---|
| markdown | | Yes | Markdown content containing image references (e.g., issue description, comment body) |
Example:
python
result = await app.extract_images(markdown="example")从Markdown内容中提取并获取图片。可用于查看Linear问题、评论或文档中嵌入的截图、图表等图片。传入Markdown内容(例如问题描述),即可获取可查看的图片数据。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| markdown | | 是 | 包含图片引用的Markdown内容(例如:问题描述、评论内容) |
示例:
python
result = await app.extract_images(markdown='example')get_issue
get_issue
Retrieve detailed information about an issue by ID, including attachments and git branch name
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Issue ID |
| includeRelations | | No | Include blocking/related/duplicate relations |
| includeCustomerNeeds | | No | Include associated customer needs |
Example:
python
result = await app.get_issue(id="example", includeRelations=True, includeCustomerNeeds=True)通过ID获取问题的详细信息,包括附件和Git分支名称
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 问题ID |
| includeRelations | | 否 | 是否包含阻塞/关联/重复的关联关系 |
| includeCustomerNeeds | | 否 | 是否包含关联的客户需求 |
示例:
python
result = await app.get_issue(id='example', includeRelations=True, includeCustomerNeeds=True)list_issues
list_issues
List issues in the user's Linear workspace. For my issues, use "me" as the assignee. Use "null" for no assignee.
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | | No | Max results (default 50, max 250) |
| cursor | | No | Next page cursor |
| orderBy | | No | Sort: createdAt |
| query | | No | Search issue title or description |
| team | | No | Team name or ID |
| state | | No | State type, name, or ID |
| cycle | | No | Cycle name, number, or ID |
| label | | No | Label name or ID |
| assignee | `str | None` | No |
| delegate | | No | Agent name or ID |
| project | | No | Project name, ID, or slug |
| priority | | No | 0=None, 1=Urgent, 2=High, 3=Normal, 4=Low |
| parentId | | No | Parent issue ID |
| createdAt | | No | Created after: ISO-8601 date/duration (e.g., -P1D) |
| updatedAt | | No | Updated after: ISO-8601 date/duration (e.g., -P1D) |
| includeArchived | | No | Include archived items |
Example:
python
result = await app.list_issues(limit=1.0, cursor="example", orderBy="example")列出用户Linear工作区中的所有问题。若要查看自己的问题,将assignee设为"me";若要查看未分配的问题,设为"null"。
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| limit | | 否 | 最大结果数(默认50,上限250) |
| cursor | | 否 | 下一页游标 |
| orderBy | | 否 | 排序方式:createdAt(创建时间) |
| query | | 否 | 搜索问题标题或描述 |
| team | | 否 | 团队名称或ID |
| state | | 否 | 状态类型、名称或ID |
| cycle | | 否 | 迭代周期名称、编号或ID |
| label | | 否 | 标签名称或ID |
| assignee | `str | None` | 否 |
| delegate | | 否 | 代理名称或ID |
| project | | 否 | 项目名称、ID或别名 |
| priority | | 否 | 优先级:0=None(无)、1=Urgent(紧急)、2=High(高)、3=Normal(普通)、4=Low(低) |
| parentId | | 否 | 父问题ID |
| createdAt | | 否 | 筛选创建时间晚于指定值:ISO-8601格式日期/时长(例如:-P1D) |
| updatedAt | | 否 | 筛选更新时间晚于指定值:ISO-8601格式日期/时长(例如:-P1D) |
| includeArchived | | 否 | 是否包含已归档项 |
示例:
python
result = await app.list_issues(limit=1.0, cursor='example', orderBy='example')save_issue
save_issue
Create or update a Linear issue. If is provided, updates the existing issue; otherwise creates a new one. When creating, and are required.
idtitleteam| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | No | Issue ID. If provided, updates the existing issue |
| title | | No | Issue title (required when creating) |
| description | | No | Content as Markdown |
| team | | No | Team name or ID (required when creating) |
| cycle | | No | Cycle name, number, or ID |
| milestone | | No | Milestone name or ID |
| priority | | No | 0=None, 1=Urgent, 2=High, 3=Normal, 4=Low |
| project | | No | Project name, ID, or slug |
| state | | No | State type, name, or ID |
| assignee | `str | None` | No |
| delegate | `str | None` | No |
| labels | | No | Label names or IDs |
| dueDate | | No | Due date (ISO format) |
| parentId | `str | None` | No |
| estimate | | No | Issue estimate value |
| links | | No | Link attachments to add [{url, title}]. Append-only; existing links are never removed |
| blocks | | No | Issue IDs/identifiers this blocks. Append-only; existing relations are never removed |
| blockedBy | | No | Issue IDs/identifiers blocking this. Append-only; existing relations are never removed |
| relatedTo | | No | Related issue IDs/identifiers. Append-only; existing relations are never removed |
| duplicateOf | `str | None` | No |
Example:
python
result = await app.save_issue(id="example", title="example", description="example")创建或更新Linear问题。若提供则更新现有问题,否则创建新问题。创建时需提供和。
idtitleteam| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 否 | 问题ID。若提供则更新现有问题 |
| title | | 否 | 问题标题(创建时必填) |
| description | | 否 | Markdown格式的描述内容 |
| team | | 否 | 团队名称或ID(创建时必填) |
| cycle | | 否 | 迭代周期名称、编号或ID |
| milestone | | 否 | 里程碑名称或ID |
| priority | | 否 | 优先级:0=None(无)、1=Urgent(紧急)、2=High(高)、3=Normal(普通)、4=Low(低) |
| project | | 否 | 项目名称、ID或别名 |
| state | | 否 | 状态类型、名称或ID |
| assignee | `str | None` | 否 |
| delegate | `str | None` | 否 |
| labels | | 否 | 标签名称或ID列表 |
| dueDate | | 否 | 截止日期(ISO格式) |
| parentId | `str | None` | 否 |
| estimate | | 否 | 问题预估工作量 |
| links | | 否 | 待添加的链接附件列表 [{url, title}]。仅追加,不会移除现有链接 |
| blocks | | 否 | 被此问题阻塞的问题ID/标识符列表。仅追加,不会移除现有关联 |
| blockedBy | | 否 | 阻塞此问题的问题ID/标识符列表。仅追加,不会移除现有关联 |
| relatedTo | | 否 | 关联问题ID/标识符列表。仅追加,不会移除现有关联 |
| duplicateOf | `str | None` | 否 |
示例:
python
result = await app.save_issue(id='example', title='example', description='example')list_issue_statuses
list_issue_statuses
List available issue statuses in a Linear team
| Parameter | Type | Required | Description |
|---|---|---|---|
| team | | Yes | Team name or ID |
Example:
python
result = await app.list_issue_statuses(team="example")列出Linear团队中可用的问题状态
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| team | | 是 | 团队名称或ID |
示例:
python
result = await app.list_issue_statuses(team='example')get_issue_status
get_issue_status
Retrieve detailed information about an issue status in Linear by name or ID
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | Yes | Status ID |
| name | | Yes | Status name |
| team | | Yes | Team name or ID |
Example:
python
result = await app.get_issue_status(id="example", name="example", team="example")通过名称或ID获取Linear中问题状态的详细信息
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 是 | 状态ID |
| name | | 是 | 状态名称 |
| team | | 是 | 团队名称或ID |
示例:
python
result = await app.get_issue_status(id='example', name='example', team='example')list_issue_labels
list_issue_labels
List available issue labels in a Linear workspace or team
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | | No | Max results (default 50, max 250) |
| cursor | | No | Next page cursor |
| orderBy | | No | Sort: createdAt |
| name | | No | Filter by name |
| team | | No | Team name or ID |
Example:
python
result = await app.list_issue_labels(limit=1.0, cursor="example", orderBy="example")列出Linear工作区或团队中可用的问题标签
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| limit | | 否 | 最大结果数(默认50,上限250) |
| cursor | | 否 | 下一页游标 |
| orderBy | | 否 | 排序方式:createdAt(创建时间) |
| name | | 否 | 按名称筛选 |
| team | | 否 | 团队名称或ID |
示例:
python
result = await app.list_issue_labels(limit=1.0, cursor='example', orderBy='example')create_issue_label
create_issue_label
Create a new Linear issue label
| Parameter | Type | Required | Description |
|---|---|---|---|
| name | | Yes | Label name |
| description | | No | Label description |
| color | | No | Hex color code |
| teamId | | No | Team UUID (omit for workspace label) |
| parent | | No | Parent label group name |
| isGroup | | No | Is label group (not directly applicable) |
Example:
python
result = await app.create_issue_label(name="example", description="example", color="example")创建Linear问题标签
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| name | | 是 | 标签名称 |
| description | | 否 | 标签描述 |
| color | | 否 | 十六进制颜色码 |
| teamId | | 否 | 团队UUID(留空则为工作区标签) |
| parent | | 否 | 父标签组名称 |
| isGroup | | 否 | 是否为标签组(暂不直接支持) |
示例:
python
result = await app.create_issue_label(name='example', description='example', color='example')list_projects
list_projects
List projects in the user's Linear workspace
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | | No | Max results (default 50, max 250) |
| cursor | | No | Next page cursor |
| orderBy | | No | Sort: createdAt |
| query | | No | Search project name |
| state | | No | State type, name, or ID |
| initiative | | No | Initiative name or ID |
| team | | No | Team name or ID |
| member | | No | User ID, name, email, or "me" |
| label | | No | Label name or ID |
| createdAt | | No | Created after: ISO-8601 date/duration (e.g., -P1D) |
| updatedAt | | No | Updated after: ISO-8601 date/duration (e.g., -P1D) |
| includeMilestones | | No | Include milestones |
| includeMembers | | No | Include project members |
| includeArchived | | No | Include archived items |
Example:
python
result = await app.list_projects(limit=1.0, cursor="example", orderBy="example")列出用户Linear工作区中的所有项目
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| limit | | 否 | 最大结果数(默认50,上限250) |
| cursor | | 否 | 下一页游标 |
| orderBy | | 否 | 排序方式:createdAt(创建时间) |
| query | | 否 | 搜索项目名称 |
| state | | 否 | 状态类型、名称或ID |
| initiative | | 否 | 倡议名称或ID |
| team | | 否 | 团队名称或ID |
| member | | 否 | 用户ID、名称、邮箱或"me" |
| label | | 否 | 标签名称或ID |
| createdAt | | 否 | 筛选创建时间晚于指定值:ISO-8601格式日期/时长(例如:-P1D) |
| updatedAt | | 否 | 筛选更新时间晚于指定值:ISO-8601格式日期/时长(例如:-P1D) |
| includeMilestones | | 否 | 是否包含里程碑 |
| includeMembers | | 否 | 是否包含项目成员 |
| includeArchived | | 否 | 是否包含已归档项 |
示例:
python
result = await app.list_projects(limit=1.0, cursor='example', orderBy='example')get_project
get_project
Retrieve details of a specific project in Linear
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | | Yes | Project name, ID, or slug |
| includeMilestones | | No | Include milestones |
| includeMembers | | No | Include project members |
| includeResources | | No | Include resources (documents, links, attachments) |
Example:
python
result = await app.get_project(query="example", includeMilestones=True, includeMembers=True)获取Linear中指定项目的详细信息
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| query | | 是 | 项目名称、ID或别名 |
| includeMilestones | | 否 | 是否包含里程碑 |
| includeMembers | | 否 | 是否包含项目成员 |
| includeResources | | 否 | 是否包含资源(文档、链接、附件) |
示例:
python
result = await app.get_project(query='example', includeMilestones=True, includeMembers=True)save_project
save_project
Create or update a Linear project. If is provided, updates the existing project; otherwise creates a new one. When creating, and at least one team (via or ) are required.
idnameaddTeamssetTeams| Parameter | Type | Required | Description |
|---|---|---|---|
| id | | No | Project ID. If provided, updates the existing project |
| name | | No | Project name (required when creating) |
| icon | | No | Icon emoji (e.g., :eagle:) |
| color | | No | Hex color |
| summary | | No | Short summary (max 255 chars) |
| description | | No | Content as Markdown |
| state | | No | Project state |
| startDate | | No | Start date (ISO format) |
| targetDate | | No | Target date (ISO format) |
| priority | | No | 0=None, 1=Urgent, 2=High, 3=Medium, 4=Low |
| addTeams | | No | Team name or ID to add |
| removeTeams | | No | Team name or ID to remove |
| setTeams | | No | Replace all teams with these. Cannot combine with addTeams/removeTeams |
| labels | | No | Label names or IDs |
| lead | `str | None` | No |
| addInitiatives | | No | Initiative names/IDs to add |
| removeInitiatives | | No | Initiative names/IDs to remove |
| setInitiatives | | No | Replace all initiatives with these. Cannot combine with addInitiatives/removeInitiatives |
Example:
python
result = await app.save_project(id="example", name="example", icon="example")创建或更新Linear项目。若提供则更新现有项目,否则创建新项目。创建时需提供,并至少指定一个团队(通过或)。
idnameaddTeamssetTeams| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | | 否 | 项目ID。若提供则更新现有项目 |
| name | | 否 | 项目名称(创建时必填) |
| icon | | 否 | 图标emoji(例如::eagle:) |
| color | | 否 | 十六进制颜色码 |
| summary | | 否 | 简短概述(最多255字符) |
| description | | 否 | Markdown格式的描述内容 |
| state | | 否 | 项目状态 |
| startDate | | 否 | 开始日期(ISO格式) |
| targetDate | | 否 | 目标日期(ISO格式) |
| priority | | 否 | 优先级:0=None(无)、1=Urgent(紧急)、2=High(高)、3=Medium(中)、4=Low(低) |
| addTeams | | 否 | 待添加的团队名称或ID列表 |
| removeTeams | | 否 | 待移除的团队名称或ID列表 |
| setTeams | | 否 | 替换为指定团队列表。不可与addTeams/removeTeams同时使用 |
| labels | | 否 | 标签名称或ID列表 |
| lead | `str | None` | 否 |
| addInitiatives | | 否 | 待添加的倡议名称/ID列表 |
| removeInitiatives | | 否 | 待移除的倡议名称/ID列表 |
| setInitiatives | | 否 | 替换为指定倡议列表。不可与addInitiatives/removeInitiatives同时使用 |
示例:
python
result = await app.save_project(id='example', name='example', icon='example')list_project_labels
list_project_labels
List available project labels in the Linear workspace
| Parameter | Type | Required | Description |
|---|---|---|---|
| limit | | No | Max results (default 50, max 250) |
| cursor | | No | Next page cursor |
| orderBy | | No | Sort: createdAt |
...additional tools omitted for brevity
列出Linear工作区中可用的项目标签
| 参数 | 类型 | 必填 | 描述 |
|---|---|---|---|
| limit | | 否 | 最大结果数(默认50,上限250) |
| cursor | | 否 | 下一页游标 |
| orderBy | | 否 | 排序方式:createdAt(创建时间) |
...为简洁起见,省略其余工具