Create a new Jira issue with optional Epic link or parent for subtasks. Args: ctx: The FastMCP context. project_key: The JIRA project key. summary: Summary/title of the issue. issue_type: Issue type (e.g., 'Task', 'Bug', 'Story', 'Epic', 'Subtask'). assig
(
ctx: Context,
project_key: Annotated[
str,
Field(
description=(
"The JIRA project key (e.g. 'PROJ', 'DEV', 'ACV2'). "
"This is the prefix of issue keys in your project. "
"Never assume what it might be, always ask the user."
),
pattern=PROJECT_KEY_PATTERN,
),
],
summary: Annotated[str, Field(description="Summary/title of the issue")],
issue_type: Annotated[
str,
Field(
description=(
"Issue type (e.g. 'Task', 'Bug', 'Story', 'Epic', 'Subtask'). "
"The available types depend on your project configuration. "
"For subtasks, use 'Subtask' (not 'Sub-task') and include parent in additional_fields."
),
),
],
assignee: Annotated[
str | None,
Field(
description="(Optional) Assignee's user identifier (string): Email, display name, or account ID (e.g., 'user@example.com', 'John Doe', 'accountid:...')",
default=None,
),
] = None,
description: Annotated[
str | None,
Field(description="Issue description in Markdown format", default=None),
] = None,
components: Annotated[
str | None,
Field(
description="(Optional) Comma-separated list of component names to assign (e.g., 'Frontend,API')",
default=None,
),
] = None,
additional_fields: Annotated[
str | None,
Field(
description=(
"(Optional) JSON string of additional fields to set. Examples:\n"
'- Set priority: {"priority": {"name": "High"}}\n'
'- Add labels: {"labels": ["frontend", "urgent"]}\n'
'- Link to parent (for any issue type): {"parent": "PROJ-123"}\n'
'- Link to epic: {"epicKey": "EPIC-123"} or {"epic_link": "EPIC-123"}\n'
'- Set Fix Version/s: {"fixVersions": [{"id": "10020"}]}\n'
'- Custom fields: {"customfield_10010": "value"}'
),
default=None,
),
] = None,
)
| 1306 | ) |
| 1307 | @check_write_access |
| 1308 | async def create_issue( |
| 1309 | ctx: Context, |
| 1310 | project_key: Annotated[ |
| 1311 | str, |
| 1312 | Field( |
| 1313 | description=( |
| 1314 | "The JIRA project key (e.g. 'PROJ', 'DEV', 'ACV2'). " |
| 1315 | "This is the prefix of issue keys in your project. " |
| 1316 | "Never assume what it might be, always ask the user." |
| 1317 | ), |
| 1318 | pattern=PROJECT_KEY_PATTERN, |
| 1319 | ), |
| 1320 | ], |
| 1321 | summary: Annotated[str, Field(description="Summary/title of the issue")], |
| 1322 | issue_type: Annotated[ |
| 1323 | str, |
| 1324 | Field( |
| 1325 | description=( |
| 1326 | "Issue type (e.g. 'Task', 'Bug', 'Story', 'Epic', 'Subtask'). " |
| 1327 | "The available types depend on your project configuration. " |
| 1328 | "For subtasks, use 'Subtask' (not 'Sub-task') and include parent in additional_fields." |
| 1329 | ), |
| 1330 | ), |
| 1331 | ], |
| 1332 | assignee: Annotated[ |
| 1333 | str | None, |
| 1334 | Field( |
| 1335 | description="(Optional) Assignee's user identifier (string): Email, display name, or account ID (e.g., 'user@example.com', 'John Doe', 'accountid:...')", |
| 1336 | default=None, |
| 1337 | ), |
| 1338 | ] = None, |
| 1339 | description: Annotated[ |
| 1340 | str | None, |
| 1341 | Field(description="Issue description in Markdown format", default=None), |
| 1342 | ] = None, |
| 1343 | components: Annotated[ |
| 1344 | str | None, |
| 1345 | Field( |
| 1346 | description="(Optional) Comma-separated list of component names to assign (e.g., 'Frontend,API')", |
| 1347 | default=None, |
| 1348 | ), |
| 1349 | ] = None, |
| 1350 | additional_fields: Annotated[ |
| 1351 | str | None, |
| 1352 | Field( |
| 1353 | description=( |
| 1354 | "(Optional) JSON string of additional fields to set. Examples:\n" |
| 1355 | '- Set priority: {"priority": {"name": "High"}}\n' |
| 1356 | '- Add labels: {"labels": ["frontend", "urgent"]}\n' |
| 1357 | '- Link to parent (for any issue type): {"parent": "PROJ-123"}\n' |
| 1358 | '- Link to epic: {"epicKey": "EPIC-123"} or {"epic_link": "EPIC-123"}\n' |
| 1359 | '- Set Fix Version/s: {"fixVersions": [{"id": "10020"}]}\n' |
| 1360 | '- Custom fields: {"customfield_10010": "value"}' |
| 1361 | ), |
| 1362 | default=None, |
| 1363 | ), |
| 1364 | ] = None, |
| 1365 | ) -> str: |
nothing calls this directly
no test coverage detected