backlog-mcp 1.0.4__tar.gz → 1.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/PKG-INFO +1 -1
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/main.py +1 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/tools/__init__.py +1 -0
- backlog_mcp-1.0.6/app/tools/update_issue_description.py +34 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/utils/ultils.py +53 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/pyproject.toml +1 -1
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/uv.lock +1 -1
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/.env.example +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/.gitignore +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/.mise.toml +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/README.md +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/__init__.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/constants/__init__.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/constants/constants.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/core/__init__.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/logging_config.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/models/__init__.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/models/models.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/server_settings.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/tools/get_issue_details.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/tools/get_user_issue_list.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/utils/__init__.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/app/utils/di.py +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/docs/mcp-installer-template.md +0 -0
- {backlog_mcp-1.0.4 → backlog_mcp-1.0.6}/scripts/install-backlog-mcp.sh +0 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
from app.utils.di import create_backlog_context
|
|
2
|
+
from app.utils.ultils import update_issue_description_handler
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
async def update_issue_description(
|
|
6
|
+
issue_key: str,
|
|
7
|
+
description: str,
|
|
8
|
+
):
|
|
9
|
+
"""
|
|
10
|
+
Updates the description of a Backlog issue.
|
|
11
|
+
|
|
12
|
+
IMPORTANT: Call this tool directly when all parameters are provided.
|
|
13
|
+
Do NOT call other tools to check issue existence beforehand.
|
|
14
|
+
|
|
15
|
+
Args:
|
|
16
|
+
issue_key (str): The key or ID of the Backlog issue to update.
|
|
17
|
+
description (str): The new description content for the issue.
|
|
18
|
+
"""
|
|
19
|
+
try:
|
|
20
|
+
if not issue_key:
|
|
21
|
+
raise ValueError("Please provide an issue key.")
|
|
22
|
+
if not description:
|
|
23
|
+
raise ValueError("Please provide a description.")
|
|
24
|
+
|
|
25
|
+
ctx = create_backlog_context()
|
|
26
|
+
result = await update_issue_description_handler(
|
|
27
|
+
backlog_domain=ctx.backlog_domain,
|
|
28
|
+
api_key=ctx.api_key,
|
|
29
|
+
issue_key=issue_key,
|
|
30
|
+
description=description,
|
|
31
|
+
)
|
|
32
|
+
return result
|
|
33
|
+
except Exception as e:
|
|
34
|
+
raise e
|
|
@@ -300,3 +300,56 @@ async def get_current_user(backlog_domain: str, api_key: str) -> dict:
|
|
|
300
300
|
raise ValueError(f"Failed to get current user: {e}") from e
|
|
301
301
|
except Exception as e:
|
|
302
302
|
raise ValueError(f"Unexpected error while getting current user: {e}") from e
|
|
303
|
+
|
|
304
|
+
|
|
305
|
+
async def update_issue_description_handler(
|
|
306
|
+
backlog_domain: str,
|
|
307
|
+
api_key: str,
|
|
308
|
+
issue_key: str,
|
|
309
|
+
description: str,
|
|
310
|
+
):
|
|
311
|
+
"""Update issue description via Backlog API.
|
|
312
|
+
|
|
313
|
+
Args:
|
|
314
|
+
backlog_domain (str): Backlog domain URL
|
|
315
|
+
api_key (str): API key for authentication
|
|
316
|
+
issue_key (str): Issue key or ID
|
|
317
|
+
description (str): New description content
|
|
318
|
+
|
|
319
|
+
Returns:
|
|
320
|
+
dict: Updated issue information
|
|
321
|
+
"""
|
|
322
|
+
try:
|
|
323
|
+
url = f"{backlog_domain}api/v2/issues/{issue_key}"
|
|
324
|
+
params = {"apiKey": api_key}
|
|
325
|
+
data = {"description": description}
|
|
326
|
+
|
|
327
|
+
async with httpx.AsyncClient() as client:
|
|
328
|
+
response = await client.patch(
|
|
329
|
+
url,
|
|
330
|
+
params=params,
|
|
331
|
+
data=data,
|
|
332
|
+
headers={"Content-Type": "application/x-www-form-urlencoded"},
|
|
333
|
+
timeout=10.0
|
|
334
|
+
)
|
|
335
|
+
response.raise_for_status()
|
|
336
|
+
result = response.json()
|
|
337
|
+
|
|
338
|
+
result = {
|
|
339
|
+
"issueKey": result["issueKey"],
|
|
340
|
+
"summary": result["summary"],
|
|
341
|
+
"description": result["description"]
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
return result
|
|
345
|
+
except httpx.HTTPStatusError as e:
|
|
346
|
+
try:
|
|
347
|
+
body = e.response.json()
|
|
348
|
+
error_code = None
|
|
349
|
+
if "errors" in body and body["errors"]:
|
|
350
|
+
error_code = body["errors"][0].get("code")
|
|
351
|
+
raise ValueError(f"API error: {BacklogApiError.get_description_by_code(error_code)}") from e
|
|
352
|
+
except Exception:
|
|
353
|
+
raise ValueError("Failed to parse error response") from e
|
|
354
|
+
except Exception as e:
|
|
355
|
+
raise ValueError(f"Request failed: {str(e)}") from e
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "backlog-mcp"
|
|
3
|
-
version = "1.0.
|
|
3
|
+
version = "1.0.6"
|
|
4
4
|
description = "A Model Context Protocol (MCP) server for Backlog project management integration"
|
|
5
5
|
authors = [{name = "BaoNguyen", email = "baonguyen@teqnological.asia"}]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|