Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Empty mcp tool result error#1142

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
rm-openai merged 2 commits intoopenai:mainfromthoo:empty-mcp-tool-result-error
Jul 16, 2025

Conversation

thoo
Copy link
Contributor

Summary

FixedMCPUtil.invoke_mcp_tool() to return"[]" instead of logging an error when MCP tools return empty content. Empty results (None, []) are valid outputs and should be treated consistently with
function tools. TheNone -> "[]" and[] -> "[]" behavior comes from the MCP Python SDK's FastMCP implementation.

Test plan

  • Added comprehensive test coverage intest_mcp_fastmcp_behavior_verification() that verifies all FastMCP edge cases
  • Enhanced FakeMCPServer to support custom content testing scenarios
  • Ran full test suite - all tests pass
  • Verified the fix handlesNone, [], {}, [{}], [[]] cases correctly

Issue number

Closes#1035

Checks

  • I've added new tests (if relevant)
  • I've added/updated the relevant documentation
  • I've runmake lint andmake format
  • I've made sure tests pass

dannyhorcajo reacted with heart emoji
@seratchseratch added bugSomething isn't working feature:mcp labelsJul 16, 2025
@seratchseratch requested a review fromrm-openaiJuly 16, 2025 03:23
Copy link
Member

@seratchseratch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This makes sense and looks good to me; thanks for sending this!

thoo reacted with thumbs up emoji
@rm-openairm-openai merged commit076eb72 intoopenai:mainJul 16, 2025
5 checks passed
@rm-openairm-openai mentioned this pull requestJul 16, 2025
rm-openai added a commit that referenced this pull requestJul 16, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@seratchseratchseratch approved these changes

@rm-openairm-openaiAwaiting requested review from rm-openai

Assignees
No one assigned
Labels
bugSomething isn't workingfeature:mcp
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Empty tool output incorrectly triggers “Errored MCP tool result”
3 participants
@thoo@seratch@rm-openai

[8]ページ先頭

©2009-2025 Movatter.jp