# JSON Array at Root Handled Incorrectly

**URL:** <https://forum.cursor.com/t/json-array-at-root-handled-incorrectly/145823>\
**Category:** Bug Reports\
**Created:** [December 10, 2025, 6:17pm UTC](https://forum.cursor.com/t/json-array-at-root-handled-incorrectly/145823 "2025-12-10T18:17:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![roqqit](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/roqqit/32/90377_2.png) [@roqqit](https://forum.cursor.com/u/roqqit)\
**Post date:** [December 10, 2025, 6:17pm UTC](https://forum.cursor.com/t/json-array-at-root-handled-incorrectly/145823/1 "2025-12-10T18:17:34Z")

</div>

### Where does the bug appear (feature/product)?

Cursor IDE

### Describe the Bug

When a JSON Array is returned by an MCP server tool, the model only sees the last element in the array.

### Steps to Reproduce

Install `mcp[cli]` via uv or pip.

Create a simple mcp server:

```auto
from mcp.server.fastmcp import FastMCP
mcp = FastMCP("Demo", json_response=True)
@mcp.tool()
def exampletool() -> list:
    return ["123", "456"]
if __name__ == " __main__":
    mcp.run(transport="streamable-http")

```

Run it, add the local server to Tools & MCP and query it. Observe that the model only returns “456” despite the response containing more than one element in the array.

### Expected Behavior

The model sees all elements in the array.

### Screenshots / Screen Recordings

 ![exampletoolscreenshot.png](https://us1.discourse-cdn.com/cursor1/original/3X/b/9/b91078817768eebb086aa46c5ac00f2ff0aa9cac.png)

### Operating System

Linux

### Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.49  
VSCode Version: 1.105.1  
Commit: 21a2ed198584d56a91c0b996d1a09c93f8538440  
Date: 2025-12-05T07:49:06.016Z  
Electron: 37.7.0  
Chromium: 138.0.7204.251  
Node.js: 22.20.0  
V8: 13.8.258.32-electron.0  
OS: Linux x64 6.1.0-18-amd64

### For AI issues: which model did you use?

Auto, Grok Code, Gemini 3, and others

### Additional Information

The behavior works as expected if you wrap the array in a JSON object like this: `{"result": ["123","456"]}` but this wrapping should be unnecessary.

### Does this stop you from using Cursor

No - Cursor works, but with this issue

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [December 10, 2025, 7:25pm UTC](https://forum.cursor.com/t/json-array-at-root-handled-incorrectly/145823/2 "2025-12-10T19:25:20Z")

</div>

Hey, thanks for the report. Could you update to version 2.2? We’ve made many improvements in this update and fixed a lot of bugs.

You can download it here: [Download · Cursor](https://cursor.com/download)  
Or update via Help \> Check for updates

Please check if the issue persists on the new version and let me know. If the bug remains, I’ll pass it to the engineering team right away.

---

<div class="post-metadata">

**Author:** ![roqqit](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/roqqit/32/90377_2.png) [@roqqit](https://forum.cursor.com/u/roqqit)\
**Post date:** [December 10, 2025, 8:25pm UTC](https://forum.cursor.com/t/json-array-at-root-handled-incorrectly/145823/3 "2025-12-10T20:25:37Z")

</div>

@deanrie  
I updated to 2.2 and the issue persists.

And side note: The primary download button is still serving 2.1. I had to click one of the links below to get 2.2.

 ![image](https://us1.discourse-cdn.com/cursor1/original/3X/4/3/43ddf11b93e75e202af3922bd324b8e0aac9e82a.png)

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/127254_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [January 2, 2026, 6:04pm UTC](https://forum.cursor.com/t/json-array-at-root-handled-incorrectly/145823/5 "2026-01-02T18:04:50Z")

</div>

Closed on January 2, 2026, 6:04pm UTC

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.
