Repository: sooperset/mcp-atlassian

Issue:
[Bug]: :"Error executing tool search: SearchMixin.search_issues() got an unexpected keyword argument 'start_at'" while executing jira_search command
### Prerequisites

- [x] I have searched the [existing issues](https://github.com/sooperset/mcp-atlassian/issues) to make sure this bug has not already been reported.
- [x] I have checked the [README](https://github.com/sooperset/mcp-atlassian/blob/main/README.md) for relevant information.

### Bug Description

When I call the jira_search command through my prompt to search issue by an assignee, I always get the following error mostly related to pagination
:"Error executing tool search: SearchMixin.search_issues() got an unexpected keyword argument 'start_at'"

### Steps to Reproduce

1. Start mcp-attlassian with the token to access JIRA server (version 9.12.*)
2. Execute the prompt to "get me all jira issues with John Doe" 
3. In docker container  logs we can see an error :[{"type":"text","text":"Error executing tool search: SearchMixin.search_issues() got an unexpected keyword argument 'start_at'"}],"isError":true}}

### Expected Behavior

Expectation is to search the issues with the valid user and return top N result

### Actual Behavior

```shell
The server returned an error message 
:[{"type":"text","text":"Error executing tool search: SearchMixin.search_issues() got an unexpected keyword argument 'start_at'"}],"isError":true}}
```

### mcp-atlassian Version

1.6.0

### Installation Method

Docker

### Operating System

Windows

### Python Version

 3.11.2

### Atlassian Instance Type

Jira Server / Data Center

### Client Application

Visual studio code

### Additional Context

_No response_


Discussion:
@guruRockz just fixed in #309! will release this hotfix version. thanks for reporting



Patch:
diff --git a/src/mcp_atlassian/servers/jira.py b/src/mcp_atlassian/servers/jira.py
index c6faef05..ef3359a4 100644
--- a/src/mcp_atlassian/servers/jira.py
+++ b/src/mcp_atlassian/servers/jira.py
@@ -221,13 +221,13 @@ async def search(
     issues = fetcher.search_issues(
         jql=jql,
         fields=fields,
-        start_at=start_at,
+        start=start_at,
         limit=limit,
         projects_filter=projects_filter,
     )
 
     # Format results
-    search_results = [issue.to_simplified_dict() for issue in issues]
+    search_results = [issue.to_simplified_dict() for issue in issues.issues]
 
     return [
         TextContent(
@@ -269,7 +269,7 @@ async def get_project_issues(
     # Get project issues
     issues = fetcher.get_project_issues(
         project_key=project_key,
-        start_at=start_at,
+        start=start_at,
         limit=limit,
     )
 


Test patch:
diff --git a/tests/unit/servers/test_jira_server.py b/tests/unit/servers/test_jira_server.py
index 5ce8df73..9b1a05eb 100644
--- a/tests/unit/servers/test_jira_server.py
+++ b/tests/unit/servers/test_jira_server.py
@@ -63,12 +63,14 @@ def mock_get_issue_comments(issue_key, limit=10):
 
     # Configure search_issues to return fixture data
     def mock_search_issues(jql, **kwargs):
-        issues = []
+        mock_result = MagicMock()
+        mock_result.issues = []
         for issue_data in MOCK_JIRA_JQL_RESPONSE_SIMPLIFIED["issues"]:
             mock_issue = MagicMock()
             mock_issue.to_simplified_dict.return_value = issue_data
-            issues.append(mock_issue)
-        return issues
+            mock_result.issues.append(mock_issue)
+        # Return a JiraSearchResult-like object with an 'issues' attribute
+        return mock_result
 
     mock_fetcher.search_issues.side_effect = mock_search_issues
 
@@ -285,11 +287,55 @@ async def test_search(jira_client, mock_jira_fetcher):
         jql="project = TEST",
         fields="summary,status",
         limit=10,
-        start_at=0,
+        start=0,
         projects_filter=None,
     )
 
 
+@pytest.mark.anyio
+async def test_search_with_jira_search_result(jira_client, mock_jira_fetcher):
+    """Test the search tool specifically with a JiraSearchResult object.
+
+    This test validates that the search tool can correctly extract issues from
+    a JiraSearchResult object's 'issues' attribute, fixing the TypeError bug
+    where the code was attempting to call to_simplified_dict() on a tuple.
+    """
+    async with jira_client as client:
+        response = await client.call_tool(
+            "search",
+            {
+                "jql": "project = TEST AND issuetype = Bug",
+                "fields": "summary,status,issuetype",
+                "limit": 5,
+            },
+        )
+
+    # The response is a list of TextContent objects
+    assert isinstance(response, list)
+    assert len(response) > 0
+    text_content = response[0]
+    assert text_content.type == "text"
+
+    # Parse the JSON content
+    content = json.loads(text_content.text)
+    # The tool returns a JSON array of issues
+    assert isinstance(content, list)
+    assert len(content) >= 1
+    assert content[0]["key"] == "PROJ-123"  # Using the key from fixture data
+
+    # Verify the fetcher was called with the correct parameters
+    mock_jira_fetcher.search_issues.assert_called_once_with(
+        jql="project = TEST AND issuetype = Bug",
+        fields="summary,status,issuetype",
+        limit=5,
+        start=0,
+        projects_filter=None,
+    )
+
+    # Reset the mock for future tests
+    mock_jira_fetcher.search_issues.reset_mock()
+
+
 @pytest.mark.anyio
 async def test_create_issue(jira_client, mock_jira_fetcher):
     """Test the create_issue tool with fixture data."""