Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[MCP][Utils] Add support for FastMCP processing #631

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from

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

Copy link

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?

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

Successfully merging this pull request may close these issues.

2 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.