Skip to content

get_indexes error #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nafraf opened this issue May 2, 2025 · 2 comments
Closed

get_indexes error #10

nafraf opened this issue May 2, 2025 · 2 comments
Assignees

Comments

@nafraf
Copy link
Contributor

nafraf commented May 2, 2025

Hello,
get_indexes tool is returning a single string with the list of the indexes, but the agent gets confused with that format:

This is the list of existing indexes:

127.0.0.1:6379> ft._list
1) idx4idx5idx6
2) idx2
3) idx1
4) idx3idx2

Now, this is the agent's answer:

Please give me the indexes that exists on redis server
GitHub Copilot
The existing indexes on the Redis server are: idx1, idx2, idx3, idx4, idx5, and idx6.

@nafraf nafraf changed the title get_indexes output error get_indexes error May 2, 2025
@mortensi
Copy link
Member

mortensi commented May 3, 2025

Thanks for the report, @nafraf. That's interesting. The server returns a list, which seems ok as a returned format.

<class 'list'>
['idx1', 'idx4idx5idx6', 'idx2', 'idx3idx2']

But Claude Desktop returns

Here are the indexes currently available on the Redis server:

idx1
idx2 (appears twice in the list)
idx3
idx4
idx5
idx6

However, using the OpenAI Agents SDK (under /examples), the result is returned correctly.

❓> Please give me the indexes that exists on redis server
Here are the indexes that exist on the Redis server:

- idx1
- idx4idx5idx6
- idx2
- idx3idx2

I tend to think that the client hallucinates. I will test the GitHub Copilot integration.

@mortensi
Copy link
Member

mortensi commented May 3, 2025

I can reproduce with GitHub Copilot as well. Converting the list to JSON seems to work. I will push a fix.

        r = RedisConnectionManager.get_connection()
        return json.dumps(r.execute_command("FT._LIST"))

Now it replies correctly.

The Redis server has the following indexes:

idx1
idx4idx5idx6
idx2
idx3idx2
Let me know if you need further details or actions related to these indexes!

Thanks again for spotting this

@mortensi mortensi closed this as completed May 3, 2025
nafraf pushed a commit to nafraf/mcp-redis that referenced this issue May 3, 2025
@mortensi mortensi self-assigned this May 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants