The Inspector UI currently emits a warning No text block matches structured content when a tool returns structuredContent (and the tool has an outputSchema) but none of the content text blocks parse as JSON equal to structuredContent.
This encourages server implementers to make CallToolResult.content a JSON-stringified copy of structuredContent, but the intended usage is that content is model-facing and may be a concise, human-readable summary (semantically equivalent without being a verbatim JSON serialization).
Where this happens:
client/src/components/ToolResults.tsx: checkContentCompatibility() attempts JSON.parse(textBlock.text) and compares JSON.stringify(parsed) === JSON.stringify(structuredContent).
- Warning message shown when no match is found:
No text block matches structured content.
Repro:
- Define a tool with an
outputSchema.
- Return a result with:
structuredContent: a valid object matching outputSchema
content: a text summary that is not JSON (e.g. "Temperature is 25C")
- Inspector shows the warning.
Expected:
- Inspector should not warn just because
content is not JSON-identical to structuredContent.
- If we keep any indicator, it should be informational (e.g. "Could not automatically verify semantic equivalence"), or only show a positive signal when a JSON match exists.
Context:
Proposed change:
- Remove the negative warning state for this check, or downgrade it to neutral/info.
- Optionally keep a positive hint when a JSON text block exactly matches
structuredContent.