set_defence_checked
Mark JIRA issues as reviewed for security compliance by setting the defence checked status. Use this tool to verify portfolio items meet security requirements.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"portfolio": "<portfolio>"
},
"name": "set_defence_checked"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| portfolio | Yes |
Implementation Reference
- src/hh_jira_mcp_server/server.py:38-46 (handler)The handler function for the set_defence_checked tool. It retrieves the Jira issue for the given portfolio ID, updates the customfield_32210 with the defense checklist text using get_defense_text(), and returns a success message with the task URL.
@mcp.tool() def set_defence_checked(portfolio: int) -> str: try: jira_api = get_jira() issue = jira_api.issue(f"PORTFOLIO-{portfolio}") issue.update(fields={'customfield_32210': [{'value': get_defense_text()}]}) return "Defence checked for " + get_task_url(issue.key) except Exception as e: return f"Error: {str(e)}" - Helper function that returns the fixed text to be set in the Jira issue's defense field for the set_defence_checked tool.
def get_defense_text(): return 'Я проверил портфель на безопасность по "Чеклисту", портфель не несет рисков или согласован с ' \ 'командой Defense.' - src/hh_jira_mcp_server/utils.py:6-8 (helper)Helper function that initializes and returns the JIRA client instance used in the set_defence_checked tool.
def get_jira(): return JIRA(server=get_host(), basic_auth=(get_user(), get_password())) - Helper function that generates the browse URL for a Jira task key, used in the success message of set_defence_checked.
def get_task_url(task_name): host = get_host() return f'{host}/browse/{task_name}' - src/hh_jira_mcp_server/server.py:38-38 (registration)The @mcp.tool() decorator registers the set_defence_checked function as an MCP tool.
@mcp.tool()