get_project_process_id
Retrieve the process ID for an Azure DevOps project to identify its workflow template and enable process-related operations.
Instructions
Gets the process ID associated with a project.
Use this tool when you need to:
- Find out which process a project is using
- Get the process ID for use in other process-related operations
- Verify process information for a project
Args:
project: Project ID or project name
Returns:
Formatted information about the process including name and ID
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project | Yes |
Implementation Reference
- The handler function for the 'get_project_process_id' tool, decorated with @mcp.tool(), which wraps the core implementation and handles exceptions.@mcp.tool() def get_project_process_id(project: str) -> str: """ Gets the process ID associated with a project. Use this tool when you need to: - Find out which process a project is using - Get the process ID for use in other process-related operations - Verify process information for a project Args: project: Project ID or project name Returns: Formatted information about the process including name and ID """ try: return _get_project_process_id_impl(project) except Exception as e: return f"Error: {str(e)}"
- Core helper function implementing the logic to retrieve the process ID and details for a given project using the Azure DevOps core client.def _get_project_process_id_impl(project: str) -> str: """Implementation of project process ID retrieval.""" try: # Get project details with process information core_client = get_core_client() project_details = core_client.get_project( project, include_capabilities=True) process_template = project_details.capabilities.get( "processTemplate", {}) process_id = process_template.get("templateTypeId") process_name = process_template.get("templateName") if not process_id: return f"Could not determine process ID for project {project}." result = [f"# Process for Project: {project_details.name}"] result.append(f"Process Name: {process_name}") result.append(f"Process ID: {process_id}") return "\n".join(result) except Exception as e: return (f"Error retrieving process ID for project '{project}': " f"{str(e)}")
- Registration call for the process tools module, which includes get_project_process_id, invoked from the work_items tools init file.process.register_tools(mcp)