diff --git a/src/server/mcp.ts b/src/server/mcp.ts index e0de538a..a5f2d0f1 100644 --- a/src/server/mcp.ts +++ b/src/server/mcp.ts @@ -226,6 +226,14 @@ export class McpServer { `Tool ${request.params.name} has no outputSchema and must return content`, ); } + + // If structuredContent is provided, it's an error + if (result.structuredContent) { + throw new McpError( + ErrorCode.InternalError, + `Tool ${request.params.name} has no outputSchema but returned structuredContent`, + ); + } } return result;