get_project
Retrieve detailed information about a specific Bitbucket project using its project key, including name, description, and metadata for project management.
Instructions
Get information about a specific project.
Args:
project_key: Project key (e.g., "DS", "PROJ")
Returns:
Project info including name, description, and metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_key | Yes |
Implementation Reference
- src/server.py:627-645 (handler)MCP tool handler function for 'get_project' that fetches project data via BitbucketClient and formats it using ProjectDetail model.@mcp.tool() @handle_bitbucket_error @formatted def get_project(project_key: str) -> dict: """Get information about a specific project. Args: project_key: Project key (e.g., "DS", "PROJ") Returns: Project info including name, description, and metadata """ client = get_client() result = client.get_project(project_key) if not result: return not_found_response("Project", project_key) return ProjectDetail.from_api(result).model_dump()
- src/bitbucket_client.py:771-783 (helper)BitbucketClient helper method that performs the actual API request to retrieve project details.def get_project(self, project_key: str) -> Optional[dict[str, Any]]: """Get project information. Args: project_key: Project key (e.g., "DS") Returns: Project info or None if not found """ return self._request( "GET", f"workspaces/{self.workspace}/projects/{project_key}", )
- src/models.py:427-452 (schema)Pydantic model defining the output schema and parsing logic for project details in get_project tool.class ProjectDetail(BaseModel): """Project info for get responses.""" key: str name: str description: str = "" private: bool = True created: Optional[str] = None updated: Optional[str] = None @field_validator("created", "updated", mode="before") @classmethod def truncate_ts(cls, v: Any) -> Optional[str]: return truncate_timestamp(v) @classmethod def from_api(cls, data: dict) -> "ProjectDetail": return cls( key=data.get("key", ""), name=data.get("name", ""), description=data.get("description", ""), private=data.get("is_private", True), created=data.get("created_on"), updated=data.get("updated_on"), )