Skip to content

fix: tools-call-simple-text now fails when tool returns isError: true#165

Open
lux999 wants to merge 1 commit intomodelcontextprotocol:mainfrom
lux999:fix/tools-call-simple-text-iserror-check
Open

fix: tools-call-simple-text now fails when tool returns isError: true#165
lux999 wants to merge 1 commit intomodelcontextprotocol:mainfrom
lux999:fix/tools-call-simple-text-iserror-check

Conversation

@lux999
Copy link

@lux999 lux999 commented Feb 24, 2026

Added an isError check to ToolsCallSimpleTextScenario, so the test tools-call-simple-text correctly fails when the tool returns an error result instead of a successful text response.

Motivation and Context

The test tools-call-simple-text was passing for servers that don't implement test_simple_text at all.
When an unknown tool is called, MCP frameworks return { isError: true, content: [{ type: "text", text: "Tool not found: ..." }] }. The existing assertions only checked for a non-empty text content item, which the "Tool not found" error message satisfies. The missing assertion was that result.isError must not be true.

How Has This Been Tested?

Verified against the existing everything-server reference implementation, which correctly implements test_simple_text and continues to pass. Confirmed that servers without test_simple_text now correctly fail the test.

Breaking Changes

Servers that were previously passing tools-call-simple-text without implementing test_simple_text will now correctly fail.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

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.

1 participant