get_vista
Retrieve sprint board details and associated sprint IDs in DevRev using a specific vista ID to filter and manage sprints effectively.
Instructions
Retrieve information about a vista in DevRev using its ID. In DevRev a vista is a sprint board which contains sprints (or vista group items). The reponse of this tool will contain the sprint (or vista group item) IDs that you can use to filter on sprints.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The DevRev ID of the vista |
Implementation Reference
- src/devrev_mcp/server.py:504-533 (handler)Handler logic for the 'get_vista' tool. Extracts the 'id' from arguments, calls make_internal_devrev_request to the 'vistas.get' endpoint, and returns the vista details or error.elif name == "get_vista": if not arguments: raise ValueError("Missing arguments") id = arguments.get("id") if not id: raise ValueError("Missing id ") response = make_internal_devrev_request( "vistas.get", { "id": id } ) if response.status_code != 200: error_text = response.text return [ types.TextContent( type="text", text=f"get_vista failed with status {response.status_code}: {error_text}" ) ] return [ types.TextContent( type="text", text=f"Vista details for '{id}':\n{response.json()}" ) ]
- src/devrev_mcp/server.py:33-46 (registration)Registration of the 'get_vista' tool in the @server.list_tools() handler, defining its name, description, and input schema requiring a 'id' string.types.Tool( name="get_vista", description="Retrieve information about a vista in DevRev using its ID. In DevRev a vista is a sprint board which contains sprints (or vista group items). The reponse of this tool will contain the sprint (or vista group item) IDs that you can use to filter on sprints.", inputSchema={ "type": "object", "properties": { "id": { "type": "string", "description": "The DevRev ID of the vista" } }, "required": ["id"] }, ),
- src/devrev_mcp/utils.py:41-68 (helper)Utility function to make authenticated POST requests to internal DevRev API endpoints, used by the get_vista handler to call 'vistas.get'.def make_internal_devrev_request(endpoint: str, payload: Dict[str, Any]) -> requests.Response: """ Make an authenticated request to the DevRev API. Args: endpoint: The API endpoint path (e.g., "works.get" or "search.hybrid") payload: The JSON payload to send Returns: requests.Response object Raises: ValueError: If DEVREV_API_KEY environment variable is not set """ api_key = os.environ.get("DEVREV_API_KEY") if not api_key: raise ValueError("DEVREV_API_KEY environment variable is not set") headers = { "Authorization": f"{api_key}", "Content-Type": "application/json", } return requests.post( f"https://api.devrev.ai/internal/{endpoint}", headers=headers, json=payload )