datarobot-genai 0.2.11__tar.gz → 0.2.12__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.
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/PKG-INFO +1 -1
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/pyproject.toml +1 -1
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/jira.py +76 -3
- datarobot_genai-0.2.12/src/datarobot_genai/drmcp/tools/jira/tools.py +101 -0
- datarobot_genai-0.2.11/src/datarobot_genai/drmcp/tools/jira/tools.py +0 -52
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/.gitignore +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/AUTHORS +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/LICENSE +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/README.md +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/agents/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/agents/base.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/chat/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/chat/auth.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/chat/client.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/chat/responses.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/cli/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/cli/agent_environment.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/cli/agent_kernel.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/custom_model.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/mcp/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/mcp/common.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/telemetry_agent.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/utils/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/utils/auth.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/utils/urls.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/crewai/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/crewai/agent.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/crewai/base.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/crewai/events.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/crewai/mcp.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/auth.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/clients.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/config.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/config_utils.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/constants.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/credentials.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dr_mcp_server.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dr_mcp_server_logo.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_prompts/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_prompts/controllers.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_prompts/dr_lib.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_prompts/register.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_prompts/utils.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/base.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/default.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/adapters/drum.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/config.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/controllers.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/metadata.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/register.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/schemas/drum_agentic_fallback_schema.json +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/deployment/schemas/drum_prediction_fallback_schema.json +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/register.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dynamic_tools/schema.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/exceptions.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/logging.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/mcp_instance.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/mcp_server_tools.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/memory_management/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/memory_management/manager.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/memory_management/memory_tools.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/routes.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/routes_utils.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/server_life_cycle.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/telemetry.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/tool_config.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/tool_filter.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/utils.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/server.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/integration_mcp_server.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/mcp_utils_ete.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/mcp_utils_integration.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/openai_llm_mcp_client.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/tool_base_ete.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/utils.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/atlassian.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/confluence.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/s3.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/confluence/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/confluence/tools.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/jira/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/data.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/deployment.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/deployment_info.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/model.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/predict.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/predict_realtime.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/project.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/training.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/langgraph/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/langgraph/agent.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/langgraph/mcp.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/llama_index/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/llama_index/agent.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/llama_index/base.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/llama_index/mcp.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/__init__.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/agent.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_auth_provider.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_llm_clients.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_llm_providers.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_mcp_client.py +0 -0
- {datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/py.typed +0 -0
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/jira.py
RENAMED
|
@@ -107,6 +107,11 @@ class JiraClient:
|
|
|
107
107
|
self._cloud_id = await get_atlassian_cloud_id(self._client, service_type="jira")
|
|
108
108
|
return self._cloud_id
|
|
109
109
|
|
|
110
|
+
async def _get_full_url(self, url: str) -> str:
|
|
111
|
+
"""Return URL for Jira API."""
|
|
112
|
+
cloud_id = await self._get_cloud_id()
|
|
113
|
+
return f"{ATLASSIAN_API_BASE}/ex/jira/{cloud_id}/rest/api/3/{url}"
|
|
114
|
+
|
|
110
115
|
async def get_jira_issue(self, issue_key: str) -> Issue:
|
|
111
116
|
"""
|
|
112
117
|
Get a Jira issue by its key.
|
|
@@ -122,9 +127,7 @@ class JiraClient:
|
|
|
122
127
|
------
|
|
123
128
|
httpx.HTTPStatusError: If the API request fails
|
|
124
129
|
"""
|
|
125
|
-
|
|
126
|
-
url = f"{ATLASSIAN_API_BASE}/ex/jira/{cloud_id}/rest/api/3/issue/{issue_key}"
|
|
127
|
-
|
|
130
|
+
url = await self._get_full_url(f"issue/{issue_key}")
|
|
128
131
|
response = await self._client.get(
|
|
129
132
|
url, params={"fields": "id,key,summary,status,reporter,assignee,created,updated"}
|
|
130
133
|
)
|
|
@@ -136,6 +139,76 @@ class JiraClient:
|
|
|
136
139
|
issue = Issue(**response.json())
|
|
137
140
|
return issue
|
|
138
141
|
|
|
142
|
+
async def get_jira_issue_types(self, project_key: str) -> dict[str, str]:
|
|
143
|
+
"""
|
|
144
|
+
Get Jira issue types possible for given project.
|
|
145
|
+
|
|
146
|
+
Args:
|
|
147
|
+
project_key: The key of the Jira project, e.g., 'PROJ'
|
|
148
|
+
|
|
149
|
+
Returns
|
|
150
|
+
-------
|
|
151
|
+
Dictionary where key is the issue type name and value is the issue type ID
|
|
152
|
+
|
|
153
|
+
Raises
|
|
154
|
+
------
|
|
155
|
+
httpx.HTTPStatusError: If the API request fails
|
|
156
|
+
"""
|
|
157
|
+
url = await self._get_full_url(f"issue/createmeta/{project_key}/issuetypes")
|
|
158
|
+
response = await self._client.get(url)
|
|
159
|
+
|
|
160
|
+
response.raise_for_status()
|
|
161
|
+
jsoned = response.json()
|
|
162
|
+
issue_types = {
|
|
163
|
+
issue_type["untranslatedName"]: issue_type["id"]
|
|
164
|
+
for issue_type in jsoned.get("issueTypes", [])
|
|
165
|
+
}
|
|
166
|
+
return issue_types
|
|
167
|
+
|
|
168
|
+
async def create_jira_issue(
|
|
169
|
+
self, project_key: str, summary: str, issue_type_id: str, description: str | None
|
|
170
|
+
) -> str:
|
|
171
|
+
"""
|
|
172
|
+
Create Jira issue.
|
|
173
|
+
|
|
174
|
+
Args:
|
|
175
|
+
project_key: The key of the Jira project, e.g., 'PROJ'
|
|
176
|
+
summary: Summary of Jira issue (title), e.g., 'Fix bug abc'
|
|
177
|
+
issue_type_id: ID type of Jira issue, e.g., "1"
|
|
178
|
+
description: Optional description of Jira issue
|
|
179
|
+
|
|
180
|
+
Returns
|
|
181
|
+
-------
|
|
182
|
+
Jira issue key
|
|
183
|
+
|
|
184
|
+
Raises
|
|
185
|
+
------
|
|
186
|
+
httpx.HTTPStatusError: If the API request fails
|
|
187
|
+
"""
|
|
188
|
+
url = await self._get_full_url("issue")
|
|
189
|
+
payload = {
|
|
190
|
+
"fields": {
|
|
191
|
+
"project": {"key": project_key},
|
|
192
|
+
"summary": summary,
|
|
193
|
+
"issuetype": {"id": issue_type_id},
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
if description:
|
|
198
|
+
payload["fields"]["description"] = {
|
|
199
|
+
"content": [
|
|
200
|
+
{"content": [{"text": description, "type": "text"}], "type": "paragraph"}
|
|
201
|
+
],
|
|
202
|
+
"type": "doc",
|
|
203
|
+
"version": 1,
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
response = await self._client.post(url, json=payload)
|
|
207
|
+
|
|
208
|
+
response.raise_for_status()
|
|
209
|
+
jsoned = response.json()
|
|
210
|
+
return jsoned["key"]
|
|
211
|
+
|
|
139
212
|
async def __aenter__(self) -> "JiraClient":
|
|
140
213
|
"""Async context manager entry."""
|
|
141
214
|
return self
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Copyright 2025 DataRobot, Inc.
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
import logging
|
|
16
|
+
from typing import Annotated
|
|
17
|
+
|
|
18
|
+
from fastmcp.exceptions import ToolError
|
|
19
|
+
from fastmcp.tools.tool import ToolResult
|
|
20
|
+
|
|
21
|
+
from datarobot_genai.drmcp.core.mcp_instance import dr_mcp_tool
|
|
22
|
+
from datarobot_genai.drmcp.tools.clients.atlassian import get_atlassian_access_token
|
|
23
|
+
from datarobot_genai.drmcp.tools.clients.jira import JiraClient
|
|
24
|
+
|
|
25
|
+
logger = logging.getLogger(__name__)
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
@dr_mcp_tool(tags={"jira", "read", "get", "issue"})
|
|
29
|
+
async def jira_get_issue(
|
|
30
|
+
*, issue_key: Annotated[str, "The key (ID) of the Jira issue to retrieve, e.g., 'PROJ-123'."]
|
|
31
|
+
) -> ToolResult:
|
|
32
|
+
"""Retrieve all fields and details for a single Jira issue by its key."""
|
|
33
|
+
if not issue_key:
|
|
34
|
+
raise ToolError("Argument validation error: 'issue_key' cannot be empty.")
|
|
35
|
+
|
|
36
|
+
access_token = await get_atlassian_access_token()
|
|
37
|
+
if isinstance(access_token, ToolError):
|
|
38
|
+
raise access_token
|
|
39
|
+
|
|
40
|
+
try:
|
|
41
|
+
async with JiraClient(access_token) as client:
|
|
42
|
+
issue = await client.get_jira_issue(issue_key)
|
|
43
|
+
except Exception as e:
|
|
44
|
+
logger.error(f"Unexpected error while getting Jira issue: {e}")
|
|
45
|
+
raise ToolError(
|
|
46
|
+
f"An unexpected error occurred while getting Jira issue '{issue_key}': {str(e)}"
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return ToolResult(
|
|
50
|
+
content=f"Successfully retrieved details for issue '{issue_key}'.",
|
|
51
|
+
structured_content=issue.as_flat_dict(),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@dr_mcp_tool(tags={"jira", "create", "add", "issue"})
|
|
56
|
+
async def jira_create_issue(
|
|
57
|
+
*,
|
|
58
|
+
project_key: Annotated[str, "The key of the project where the issue should be created."],
|
|
59
|
+
summary: Annotated[str, "A brief summary or title for the new issue."],
|
|
60
|
+
issue_type: Annotated[str, "The type of issue to create (e.g., 'Task', 'Bug', 'Story')."],
|
|
61
|
+
description: Annotated[str | None, "Detailed description of the issue."] = None,
|
|
62
|
+
) -> ToolResult:
|
|
63
|
+
"""Create a new Jira issue with mandatory project, summary, and type information."""
|
|
64
|
+
if not all([project_key, summary, issue_type]):
|
|
65
|
+
raise ToolError(
|
|
66
|
+
"Argument validation error: project_key, summary, and issue_type are required fields."
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
access_token = await get_atlassian_access_token()
|
|
70
|
+
if isinstance(access_token, ToolError):
|
|
71
|
+
raise access_token
|
|
72
|
+
|
|
73
|
+
async with JiraClient(access_token) as client:
|
|
74
|
+
# Maybe we should cache it somehow?
|
|
75
|
+
# It'll be probably constant through whole mcp server lifecycle...
|
|
76
|
+
issue_types = await client.get_jira_issue_types(project_key=project_key)
|
|
77
|
+
|
|
78
|
+
try:
|
|
79
|
+
issue_type_id = issue_types[issue_type]
|
|
80
|
+
except KeyError:
|
|
81
|
+
possible_issue_types = ",".join(issue_types)
|
|
82
|
+
raise ToolError(
|
|
83
|
+
f"Unexpected issue type `{issue_type}`. Possible values are {possible_issue_types}."
|
|
84
|
+
)
|
|
85
|
+
|
|
86
|
+
try:
|
|
87
|
+
async with JiraClient(access_token) as client:
|
|
88
|
+
issue_key = await client.create_jira_issue(
|
|
89
|
+
project_key=project_key,
|
|
90
|
+
summary=summary,
|
|
91
|
+
issue_type_id=issue_type_id,
|
|
92
|
+
description=description,
|
|
93
|
+
)
|
|
94
|
+
except Exception as e:
|
|
95
|
+
logger.error(f"Unexpected error while creating Jira issue: {e}")
|
|
96
|
+
raise ToolError(f"An unexpected error occurred while creating Jira issue: {str(e)}")
|
|
97
|
+
|
|
98
|
+
return ToolResult(
|
|
99
|
+
content=f"Successfully created issue '{issue_key}'.",
|
|
100
|
+
structured_content={"newIssueKey": issue_key, "projectKey": project_key},
|
|
101
|
+
)
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
# Copyright 2025 DataRobot, Inc.
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
import logging
|
|
16
|
-
from typing import Annotated
|
|
17
|
-
|
|
18
|
-
from fastmcp.exceptions import ToolError
|
|
19
|
-
from fastmcp.tools.tool import ToolResult
|
|
20
|
-
|
|
21
|
-
from datarobot_genai.drmcp.core.mcp_instance import dr_mcp_tool
|
|
22
|
-
from datarobot_genai.drmcp.tools.clients.atlassian import get_atlassian_access_token
|
|
23
|
-
from datarobot_genai.drmcp.tools.clients.jira import JiraClient
|
|
24
|
-
|
|
25
|
-
logger = logging.getLogger(__name__)
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
@dr_mcp_tool(tags={"jira", "read", "get", "issue"})
|
|
29
|
-
async def jira_get_issue(
|
|
30
|
-
*, issue_key: Annotated[str, "The key (ID) of the Jira issue to retrieve, e.g., 'PROJ-123'."]
|
|
31
|
-
) -> ToolResult:
|
|
32
|
-
"""Retrieve all fields and details for a single Jira issue by its key."""
|
|
33
|
-
if not issue_key:
|
|
34
|
-
raise ToolError("Argument validation error: 'issue_key' cannot be empty.")
|
|
35
|
-
|
|
36
|
-
access_token = await get_atlassian_access_token()
|
|
37
|
-
if isinstance(access_token, ToolError):
|
|
38
|
-
raise access_token
|
|
39
|
-
|
|
40
|
-
try:
|
|
41
|
-
async with JiraClient(access_token) as client:
|
|
42
|
-
issue = await client.get_jira_issue(issue_key)
|
|
43
|
-
except Exception as e:
|
|
44
|
-
logger.error(f"Unexpected error getting Jira issue: {e}")
|
|
45
|
-
raise ToolError(
|
|
46
|
-
f"An unexpected error occurred while getting Jira issue '{issue_key}': {str(e)}"
|
|
47
|
-
)
|
|
48
|
-
|
|
49
|
-
return ToolResult(
|
|
50
|
-
content=f"Successfully retrieved details for issue '{issue_key}'.",
|
|
51
|
-
structured_content=issue.as_flat_dict(),
|
|
52
|
-
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/agents/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/chat/responses.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/cli/agent_environment.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/cli/agent_kernel.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/telemetry_agent.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/core/utils/__init__.py
RENAMED
|
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
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/config_utils.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/constants.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/credentials.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/dr_mcp_server.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/mcp_instance.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/mcp_server_tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/routes_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/telemetry.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/tool_config.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/core/tool_filter.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/test_utils/utils.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/clients/s3.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/jira/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/drmcp/tools/predictive/data.py
RENAMED
|
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
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/llama_index/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_auth_provider.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_llm_clients.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_llm_providers.py
RENAMED
|
File without changes
|
{datarobot_genai-0.2.11 → datarobot_genai-0.2.12}/src/datarobot_genai/nat/datarobot_mcp_client.py
RENAMED
|
File without changes
|
|
File without changes
|