Skip to content

Conversation

@Czhang0727
Copy link

Fixing issue #630

Problem:
In FastMCP, the structure did not have array data inside of result, instead, the result itself is the array itself. And the text field is used.

Add a type check, if we found it an array, simply merge all results with the content. Please find the fixed test project here: https://github.com/Czhang0727/object-rag

@github-actions
Copy link
Contributor

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label May 11, 2025
@Czhang0727
Copy link
Author

seems no one is reviewing this change, plz let me know if there is any updates

@github-actions github-actions bot removed the stale label May 17, 2025
@rm-openai
Copy link
Collaborator

Sorry was out on vacation! Will take a closer look soon.

@rm-openai
Copy link
Collaborator

Not totally understanding the issue here. When would the return type not have content?

@Czhang0727
Copy link
Author

In the current code, we are expecting

result = {
content: [content_object]
}

in fastMCP, I got a response like

result = [content_object]

@rm-openai
Copy link
Collaborator

@Czhang0727 The spec is pretty clear that the response must be result: { content: [...] } } (https://modelcontextprotocol.io/specification/2025-03-26/server/tools#calling-tools).

So is it possible your server is not compliant?

@Czhang0727
Copy link
Author

hmm, in that case, fastMCP may have some issue, let me check the behavior and get back to the thread

@github-actions
Copy link
Contributor

github-actions bot commented Jun 7, 2025

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label Jun 7, 2025
@github-actions
Copy link
Contributor

This PR was closed because it has been inactive for 7 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants